EIP-4399: Supplant DIFFICULTY opcode with RANDOM

There is an RFC to reconsider the opcode name and probably use anything else than RANDOM:

Beacon chain RANDAO mixes are much less biasable than difficulty and blockHash values in PoW network. But they are still biasable up to a limited extent which is expanded in the Security Considerations section of the EIP.

One of nice to have things limiting biasability is to have a RANDOM(n) instruction, where n is a slot number, which returns a RANDAO mix produced in a specified slot disregarding whether this slot is empty or not (if empty, RANDAO mix from latest non-empty slot is returned). It prevents an attack where proposer/builder pushes back transaction that rolls the dice until a mix with desired outcome is met. Security properties of return value of this instruction may be hardened up by returning a recent VDF result.

So, we might want RANDOM instruction to have a parameter in the future and this is where the RANDOM name proposed in EIP-4399 may become a source of confusion.

Options:

  1. Keep DIFFICULTY -> RANDOM renaming, and name the future opcode if that need be SECURE_RANDOM(n) or RANDOM2(n) (the latter is a sort of a joke as it looks terrible). Or any reserve any other name for the future – we have a plenty of time for this
  2. Rename DIFFICULTY -> ?, we need to define ? in the next few days. RANDOM stays reserved for the future
  3. Keep DIFFICULTY to reflect how difficult it is to pick up a name