Skip to content

Pass proposer slot to randao reveal#9280

Open
diegomrsantos wants to merge 2 commits into
sigp:unstablefrom
diegomrsantos:codex/randao-reveal-slot
Open

Pass proposer slot to randao reveal#9280
diegomrsantos wants to merge 2 commits into
sigp:unstablefrom
diegomrsantos:codex/randao-reveal-slot

Conversation

@diegomrsantos
Copy link
Copy Markdown
Member

@diegomrsantos diegomrsantos commented May 8, 2026

Motivation

Block proposal duties are scheduled and executed by slot. The block service already has the proposer slot when it requests a RANDAO reveal, but ValidatorStore::randao_reveal accepted only the signing epoch.

The epoch is enough for Lighthouse to build the RANDAO signing message, because RANDAO signs the epoch. It is not enough for every validator-store implementation, because the proposer slot is still part of the duty context. If an implementation needs that slot, the old trait shape forces it to recover the slot from local clock state or carry it out of band.

This PR keeps one source of truth. The caller passes the proposer slot it is already processing, and the validator store derives the RANDAO signing epoch from that slot.

Changes

  • Update ValidatorStore::randao_reveal to accept a Slot.
  • Pass the proposer slot directly from block production.
  • Derive the signing epoch inside LighthouseValidatorStore::randao_reveal.
  • Add a trait doc comment explaining why the API takes a slot even though RANDAO signs an epoch.
  • Update the Web3Signer RANDAO test call site.

Documentation

The documentation change is on ValidatorStore::randao_reveal, where implementers see the contract. I did not update the Lighthouse book or release notes because this is an internal Rust trait change, not a user-facing CLI, config, HTTP API, or behavior change.

Verification

  • Formatted the workspace.
  • Checked the affected validator-store, validator-services, Lighthouse validator-store, and Web3Signer test packages.

@diegomrsantos diegomrsantos force-pushed the codex/randao-reveal-slot branch from 2395447 to 880f322 Compare May 8, 2026 16:11
@diegomrsantos diegomrsantos marked this pull request as ready for review May 8, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant