Start typing to search this publication.
Orange Soda
Open menu

Subscribe to Orange Soda

Get new posts delivered straight to your inbox.

How Tari's multi-lane mining works, and what 100 real mainnet blocks showed me

why a lane with 66x less hashrate can still win more blocks, and the new rule that taxes one algorithm hogging the tip

Orange Soda
6 min read

I've spent most of this month on the Ootle side of Tari, building on Esmeralda and poking at stealth outputs. But everything on Ootle sits on top of the base layer, and the base layer is secured by miners. So this time I went down a level and tried to understand how Tari mining actually works. Not "how do I set up a miner", but why the chain uses four proof-of-work algorithms at once, and what that looks like on mainnet right now.

The four lanes

Tari blocks can be mined with four different algorithms. The RFC library and the explorer call them:

  • RxM: RandomX, merge-mined with Monero through the merge-mining proxy and XMRig. CPU miners who already mine Monero can mine Tari at the same time.

  • RxT: RandomX again, but solo Tari, not tied to Monero. Same CPUs, separate lane.

  • Sha3x: a triple SHA3-256 hash. This is the GPU and ASIC friendly lane.

  • C29: Cuckaroo-29, a memory-bound algorithm. It's mined on GPUs and is expensive to build ASICs or FPGAs for.

The block header has a pow_algo field that says which lane a block came from (0 RxM, 1 Sha3x, 2 RxT, 3 C29 in the explorer data I pulled). The tokenomics page says the block rewards are split evenly, each lane targeting 25%.

Why bother with four? The mining RFC is pretty direct about it. Relying only on RandomX merge-mined with Monero would make Tari vulnerable to large Monero pools, so solo RandomX is there as a second CPU lane. SHA3 is simple and well understood, so if ASICs show up, the hope is they get commoditised across many suppliers instead of one company. Cuckaroo-29 makes custom hardware costly and its memory requirement is easy to raise. The idea is hardware diversity: CPUs, GPUs and eventually ASICs all have a lane, and no single kind of hardware owns the chain.

Each lane has its own clock

This is the part that took me the longest to get. Each algorithm runs its own difficulty adjustment, an LWMA (linear weighted moving average) over the last 90 blocks of that algorithm, and each one targets 8 minutes (480 seconds). Four lanes at 8 minutes each gives one block every 2 minutes on average, which matches Monero's block time.

The consequence is a bit counterintuitive. Adding hashrate to one lane does not give that lane more blocks for long. Its difficulty just goes up until it's back to roughly one block every 8 minutes. Block share is set by the target times, not by who has the biggest machines.

What 100 mainnet blocks looked like

I wanted to see this for myself instead of just trusting the RFC, so I pulled the latest 100 headers from the public text explorer (textexplore.tari.com) on Oct 30. That was blocks 376,691 to 376,790, about 06:32 to 09:29 UTC.

Blocks per lane:

  • RxT: 30

  • RxM: 26

  • C29: 23

  • Sha3x: 21

Now compare that with the hashrate estimates the explorer showed at the same moment:

  • Sha3x: about 533.6 TH/s

  • RxM: about 3.74 GH/s

  • RxT: about 56.6 MH/s

  • C29: about 19.9k graphs/s

So the merge-mined RandomX lane had roughly 66 times the hashrate of solo RandomX, and solo RandomX still won more blocks in that window (30 vs 26). You can't compare Sha3x hashes to RandomX hashes directly, they're different work, but the point stands. The lanes were all in the same 21 to 30 range no matter how much hardware was behind them. That's the per-lane LWMA doing its job.

The timing was close to the targets too. Average block interval over those 100 blocks was about 108 seconds against the 120 second target, and the explorer's per-lane averages were 5.6 to 7.4 minutes against 8. A 100-block window is short, so I wouldn't read much into a 10% gap. Mostly it's noise.

One more detail. Writing the lanes as letters, the longest same-algorithm run in my window was five RxT blocks in a row. 69 of the 82 runs were a single block. Normal mixing, mostly.

The weak spot: chain selection

Here's where it gets interesting. When two chain tips compete, Tari has to decide which one has more work. It does that by multiplying the accumulated difficulty of all four lanes together, RxM * RxT * Sha3x * C29, and picking the bigger product. It's the geometric mean without the final root, since only the ordering matters.

TIP-RFC-MT-0004 (status Accepted, last modified 2026-08-19) points out the problem with that. If two competing blocks are mined on RxM with difficulty x and on Sha3x with difficulty y, the comparison reduces to x / RxM vs y / Sha3x. If one lane's difficulty grows much faster than the others, say Sha3x because ASICs take over, its blocks keep winning those comparisons. That lane could then reorg blocks from the other lanes far too often, which defeats the whole point of having four.

The fix: a backoff on same-lane runs

The RFC's answer is an exponential backoff. If a block is mined with algorithm A and the previous block was also A, A's target time doubles. Each extra consecutive block doubles it again. Any block from a different lane resets it. The modifier is m = min(2^(r-1), 32), where r is the run length. So 1, 2, 4, 8, 16, then capped at 32x from the sixth block on.

Two things I liked about how it's argued:

Why the factor is two. Model each block's lane as random with share p. The expected penalty a block pays works out to (1-p)/(1-2p), which only converges while p is under 1/2. So a doubling factor makes the penalty blow up exactly at a 50% block share, the same majority line the chain already treats as the security boundary. A factor of 1.5 would only bite above two thirds. A factor of 3 would already punish a lane holding a third of blocks.

Why there's a cap. If every other lane lost its miners after a fork, nothing would reset the penalty, and an uncapped modifier would double until the chain stopped. With the 32x cap, a single-lane chain slows to about 4.3 hours per block (32 x 8 minutes) and recovers as soon as any other lane mines. A chain with only RandomX miners never even gets there, because RxM and RxT reset each other.

That last point is a deliberate choice. An earlier draft grouped RxM and RxT into one RandomX class. The final version keeps all four separate. The RFC's simulation says grouping them would have charged RandomX about 1.47x against about 1.15x for Sha3x, and raised mean block time by about 8% instead of about 2%. So keeping them separate stops the rule from landing hardest on CPU miners, and keeps it aimed at what the threat model is about: one-algorithm concentration, especially Sha3x ASICs: one-algorithm concentration, especially Sha3x ASICs.

In normal operation the cost is small. The RFC's simulation with four live lanes gives an expected modifier of about 1.16. Long runs get rarer, because while a lane holds the tip it's throttled and the other three aren't.

As far as I can tell from the repo, this is already wired into the node code. Pull request 8070, merged on Oct 1, makes the base node show the backoff-adjusted target difficulty next to the raw one. The idea is that a run of same-algorithm blocks can raise the target a block has to clear by up to 32x.

What I took away

Before this I thought of "multi-algo" as a fairness thing, so CPU people and GPU people both get a turn. It's that, but it's really a security design. Per-lane difficulty keeps block share flat even when hashrate is wildly uneven. And the new backoff closes the gap where one lane, getting much stronger, could have dominated chain selection.

If you want to check my numbers, the text explorer has a JSON view, and 100 headers is enough to see the lanes mixing. Next time I see five RxT blocks in a row, I'll know that under the backoff the fifth one had to clear a 16x target.

Sources: rfc.tari.com (RFC-0131 Mining, TIP-RFC-MT-0004, Base Layer overview), tari.com/tokenomics, textexplore.tari.com JSON snapshot taken Oct 30 2026 09:29 UTC, github.com/tari-project/tari pull 8070.

Official docs: Tari RFC-0131 Mining

Subscribe to Orange Soda

notes on web3 tools, written while learning