gloas validator client proposer preferences - #16548
Conversation
|
needs #16538 |
| msg := v.message() | ||
| epoch := slots.ToEpoch(msg.ProposalSlot) | ||
| domain, err := signing.Domain(st.Fork(), epoch, params.BeaconConfig().DomainBeaconProposer, st.GenesisValidatorsRoot()) | ||
| domain, err := signing.Domain(st.Fork(), epoch, params.BeaconConfig().DomainProposerPreferences, st.GenesisValidatorsRoot()) |
There was a problem hiding this comment.
it should be this right?
terencechain
left a comment
There was a problem hiding this comment.
One concern:
Right now buildProposerSettingsRequests piggybacks on the existing PushProposerSettings flow, which runs every epoch for all active validators. That works for PrepareBeaconProposer, but the gossip spec for proposer preferences has stricter requirements:
- proposal_slot must be in the next epoch — the spec says
compute_epoch_at_slot(preferences.proposal_slot) == get_current_epoch(state) + 1, but the code setsProposalSlot = slot (current slot). Peers will IGNORE these. - Only validators who are actual proposers in the next epoch should submit — the spec requires
is_valid_proposal_slot(state, preferences)to pass, meaning the validator must be in the proposer lookahead for that specific slot
So I think the proposer preferences path needs its own logic that checks the next epoch's proposer assignments
| ethereum.eth.v1alpha1.BeaconBlockGloas block_gloas = 123; | ||
| ethereum.eth.v1alpha1.ExecutionPayloadEnvelope execution_payload_envelope = 124; | ||
| ethereum.eth.v1alpha1.PayloadAttestationData payload_attestation_data = 125; | ||
| ethereum.eth.v1alpha1.ProposerPreferences proposer_preferences = 126; |
There was a problem hiding this comment.
everything above is singular, should this be preference or preferences?
There was a problem hiding this comment.
let me fix that to singular
| SubmitValidatorRegistrations(ctx context.Context, in *ethpb.SignedValidatorRegistrationsV1) (*empty.Empty, error) | ||
| // SubmitSignedProposerPreferences submits proposer preferences for upcoming | ||
| // proposal slots. This replaces PrepareBeaconProposer and SubmitValidatorRegistrations | ||
| // for GLOAS+. |
There was a problem hiding this comment.
Prefer Gloas vs GLOAS
|
this pr depends on #16564 |
**What type of PR is this?** Feature **What does this PR do? Why is it needed?** adds validator client call to proposer preferences. adds todo comments for when we fully replace prepare beacon proposer endpoint with proposer preferences. **Which issues(s) does this PR fix?** partially addresses OffchainLabs#16545 **Other notes for review** **Acknowledgements** - [x] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [x] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [x] I have added a description with sufficient context for reviewers to understand this PR. - [ ] I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).
What type of PR is this?
Feature
What does this PR do? Why is it needed?
adds validator client call to proposer preferences. adds todo comments for when we fully replace prepare beacon proposer endpoint with proposer preferences.
Which issues(s) does this PR fix?
partially addresses #16545
Other notes for review
Acknowledgements