You are reading the plain version of COIN Online.Open it on the COIN desktop »
COINonline home

Your money. Your business.

Mining

RandomX-v2

Coin's proof of work runs random programs that suit the processor already in your computer, so mining stays open to everyone instead of a few chip makers.

How it works

For each attempt at a block, RandomX writes a new random program and runs it on a virtual machine. The programs mix integer and floating-point maths, memory reads and branches, the everyday work a general-purpose processor is built for. A large dataset held in memory and the processor's own cache are part of every hash.

Why it suits ordinary computers

To run random programs quickly, you need a chip that can run any program quickly. That chip is a CPU. A custom mining chip would end up looking much like the processor already in your desktop or laptop, so there's little to gain from building one, and mining stays spread across many independent computers.

The version Coin uses

Coin uses RandomX-v2, the version named in its genesis block. It has been the proof of work since block 0.

Two ways to run RandomXFigures published by RandomX's authors
  • Fast modeFor mining. Keeps the full dataset in memory, about 2080 MiB.
  • Light modeFor checking blocks. Needs only about 256 MiB, and runs more slowly.

Miners use fast mode. A node that only checks blocks can use light mode and save memory.

Advanced: getting the most from your CPU

Each mining thread works best with about 2 MiB of the processor's L3 cache, according to RandomX's authors. If you have the spare memory, turning on large pages in your operating system can speed mining up.

The wallet's Use half (recommended) button is a good starting point. Try a few settings and watch the hashrate on the Mining page.