Pass proposer slot to randao reveal#9280
Open
diegomrsantos wants to merge 2 commits into
Open
Conversation
2395447 to
880f322
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_revealaccepted 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
ValidatorStore::randao_revealto accept aSlot.LighthouseValidatorStore::randao_reveal.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