Skip to main content

RandomX key schedule

Algorithm​

Zecnero uses RandomX with a different Argon2 salt so that its hashes differ from Monero’s.

ParameterValue
Algorithm namerx/zecnero
Argon2 salt"ZecneroRX" followed by byte 0x01
All other RandomX parametersReference RandomX v1.2 values

Key changes​

The RandomX key (seed) changes every 2048 blocks, about 42.7 hours at 75 seconds per block. Each new key is fixed 64 blocks before it comes into use. This is the same rule Monero uses.

The seed height for a block at height, in Monero’s form:

if height <= 2048 + 64:
seed_height = 0
else:
seed_height = (height - 64 - 1) & ~(2048 - 1)

The 64-block lag gives miners and pools time to build the new RandomX dataset before it is needed.

TODO

Confirm that the seed is the block hash at seed_height (as in Monero), the byte order it is passed to RandomX in, and the genesis-era seed value. Check the formula above against the zecnerod source.

RandomX v2 (NU1)​

NU1 included RandomX v2 work under the name rx/zecnero2. A third-party miner uses the alias rx2/zecnero.

TODO

Confirm the final algorithm name and parameters after NU1, and whether the key schedule changed.