XMR plans to switch to RandomX in October of this year
RandomX is a proof-of-work (PoW) algorithm that is optimized for general-purpose CPUs. RandomX uses random code execution (hence the name) together with several memory-hard techniques to minimize the efficiency advantage of specialized hardware.
RandomX behaves like a keyed hashing function: it accepts a key K and arbitrary input H and produces a 256-bit result R. Under the hood, RandomX utilizes a virtual machine that executes programs in a special instruction set that consists of a mix of integer math, floating point math and branches. These programs can be translated into the CPU’s native machine code on the fly. Example of a RandomX program translated into x86-64 assembly is program.asm. A portable interpreter mode is also provided.
RandomX can operate in two main modes with different memory requirements:
- Fast mode – requires 2080 MiB of shared memory.
- Light mode – requires only 256 MiB of shared memory, but runs significantly slower