EIPs Explained

EIP-7998 · Draft · Core · 2025-08-03

EIP-7998: Turn `randao_reveal` into a VRF

Makes the block proposer's `randao_reveal` sign the previous epoch's RANDAO mix and the slot instead of just the epoch number, turning it into a per-slot BLS VRF that nobody can precompute.

What problem does it solve?

Each beacon block contains a randao_reveal: the proposer's BLS signature over the current epoch number. It is hashed into the RANDAO mix that the protocol uses as on-chain randomness (and that contracts read via PREVRANDAO).

Because the signed message is just the epoch number, a validator can compute all of its future reveals in advance. That makes the reveal useless as a fresh random value per proposer and blocks designs that need a private, unpredictable value from each proposer, such as Single Secret Leader Election (secret proposer election), which the authors say would reduce MEV and remove the known RANDAO bias attack.

How it works

After the fork, the proposer signs a new SSZ container instead of the epoch:

class RandaoRevealSeed(Container):
    previous_mix: Bytes32  # final RANDAO mix of the previous epoch
    slot: Slot             # current slot
  • previous_mix is not known until the previous epoch ends, so reveals cannot be computed for future epochs, not even by the validator itself.
  • slot makes every reveal unique, even when a validator proposes several times in one epoch.

Verification in process_randao stays a single bls.Verify against the proposer's public key, using the same DOMAIN_RANDAO. The reveal is still mixed into the RANDAO mix exactly as before. A BLS signature on a message is deterministic and verifiable, so it acts as a VRF (secure under the Computational Diffie-Hellman assumption) without a separate proof.

The authors chose the previous epoch's mix rather than the latest one, because using the latest mix would create fork ambiguity if the reveal is later used for SSLE.

Sample code

The modified process_randao (consensus-spec Python):

def process_randao(state: BeaconState, body: BeaconBlockBody) -> None:
    epoch = get_current_epoch(state)
    proposer = state.validators[get_beacon_proposer_index(state)]
    if epoch < FORK_EPOCH:
        signing_root = compute_signing_root(epoch, get_domain(state, DOMAIN_RANDAO))
    else:
        seed = RandaoRevealSeed(
            previous_mix=get_randao_mix(state, get_previous_epoch(state)),
            slot=state.slot,
        )
        signing_root = compute_signing_root(seed, get_domain(state, DOMAIN_RANDAO))
    assert bls.Verify(proposer.pubkey, signing_root, body.randao_reveal)

    mix = xor(get_randao_mix(state, epoch), hash(body.randao_reveal))
    state.randao_mixes[epoch % EPOCHS_PER_HISTORICAL_VECTOR] = mix

Things to know

  • Status: Draft. It is a consensus-layer hard-fork change; blocks after the fork that sign the old message are invalid.
  • Validator clients and remote signers must be updated to sign RandaoRevealSeed instead of the epoch number.
  • Within the current epoch, the reveal is still predictable to the proposer itself; the slot field only matters once secret leader election or EIP-7956 builds on it.
  • The reveal has no grindable inputs, but this proposal does not by itself remove the existing "last revealer" bias of RANDAO; that requires the follow-up designs it enables.

#consensus #randomness #randao #vrf #bls

Details

Authors
Alberto La Rocca (@71104), Aryaethn (@aryaethn)
Status
Draft
Type
Standards Track / Core
Created
2025-08-03
Required by

Machine-readable: Markdown · JSON