Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push proposer settings every slot: builder #14155

Merged
merged 15 commits into from
Jul 30, 2024
Merged

Conversation

james-prysm
Copy link
Contributor

@james-prysm james-prysm commented Jun 27, 2024

What type of PR is this?

Other

What does this PR do? Why is it needed?

This is a temporary fix/improvement to how often push proposer settings get called until a rework of health tracking and account changes is implemented.

currently, the push proposer settings API is called at the start of every epoch and updates the proposer cache on the beacon node. This may not be ideal as sometimes validators get added in the middle of the epoch and wouldn't correctly account for proposals afterward within the same epoch. Other cases include beacon node upgrades or migrations requiring load balancing, the proposer cache and such may not be updated at the start of the switchover.

Below are some benchmarks for several hundred keys. The majority of the processing time is collecting the current status of keys, and not the API calls themselves.

image

currently, I believe lighthouse at the very least does something similar.

testing on holesky with about 5k keys yielded the following results

duration longest process longest process duration
     
2.28s validator.SubmitValidatorRegistrations 2.23s
2.86s validator.SubmitValidatorRegistrations 2.81s
2.32s validator.SubmitValidatorRegistrations 2.25s
522ms validator.filterAndCacheActiveKeys 450.78ms
1.72s validator.SubmitValidatorRegistrations 1.66s
1.09s validator.filterAndCacheActiveKeys 1.01s
993.03ms validator.filterAndCacheActiveKeys 934.84ms

-- results have been updated --

with an updated call things changed to 52ms on holesky, 5k keys signed
image

Which issues(s) does this PR fix?

Fixes #14179

Other notes for review

@james-prysm james-prysm added the API Api related tasks label Jul 12, 2024
@james-prysm james-prysm marked this pull request as ready for review July 12, 2024 15:15
@james-prysm james-prysm requested a review from a team as a code owner July 12, 2024 15:15
@james-prysm james-prysm added the Ready For Review A pull request ready for code review label Jul 12, 2024
rkapka
rkapka previously approved these changes Jul 12, 2024
}
}()
// account has changed in the middle of an epoch
if err := v.PushProposerSettings(ctx, km, slot, time.Now().Add(1*time.Minute)); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 1 minute instead of 1 slot ?

return errors.Wrap(ErrBuilderValidatorRegistration, err.Error())
if len(signedRegReqs) > 0 {
go func() {
if err := SubmitValidatorRegistrations(ctx, v.validatorClient, signedRegReqs, v.validatorsRegBatchSize); err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will cancel at the end of the slot, for some groups like dvts should we provide much longer deadlines?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our code should assume that it is a single logical validator underneath. Also this simply sends it out to multiple relays which is unrelated to dvts.

@james-prysm james-prysm added this pull request to the merge queue Jul 30, 2024
Merged via the queue into develop with commit 2fc7cde Jul 30, 2024
16 of 17 checks passed
@james-prysm james-prysm deleted the temp-push-every-slot branch July 30, 2024 19:38
@james-prysm james-prysm changed the title Push proposer settings every slot Push proposer settings every slot: builder Aug 22, 2024
@james-prysm james-prysm added the Builder PR or issue that supports builder related work label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks Builder PR or issue that supports builder related work Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--suggested-fee-recipient for validator not overriding beacon's address in Prysm v5.0.3
3 participants