-
Notifications
You must be signed in to change notification settings - Fork 988
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
Replace validator wait for activation stream with polling #14514
base: develop
Are you sure you want to change the base?
Conversation
@@ -341,46 +327,6 @@ func TestCanonicalHeadSlot_OK(t *testing.T) { | |||
assert.Equal(t, primitives.Slot(0), headSlot, "Mismatch slots") | |||
} | |||
|
|||
func TestWaitMultipleActivation_LogsActivationEpochOK(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate test no longer needed, covered in activation_test
|
||
func (v *validator) handleReconnection(ctx context.Context, span octrace.Span, err error, message string, accountsChangedChan <-chan [][fieldparams.BLSPubkeyLength]byte) error { | ||
tracing.AnnotateError(span, err) | ||
attempts := streamAttempts(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should i rename this streamAttempts variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code block is small enough that I don't think it matters too much. It should be very clear what it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess it's not really a stream
|
||
func (v *validator) handleReconnection(ctx context.Context, span octrace.Span, err error, message string, accountsChangedChan <-chan [][fieldparams.BLSPubkeyLength]byte) error { | ||
tracing.AnnotateError(span, err) | ||
attempts := streamAttempts(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code block is small enough that I don't think it matters too much. It should be very clear what it is
} | ||
|
||
someAreActive = v.checkAndLogValidatorStatus(valCount) | ||
func (v *validator) waitForAccountsChange(ctx context.Context, accountsChangedChan <-chan [][fieldparams.BLSPubkeyLength]byte) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have some of these unexported functions with comments and others not. Should we just add comments to the rest of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think comments are required on unexported, it's probably fine to keep whatever we have.
Co-authored-by: Sammy Rosso <[email protected]>
Co-authored-by: Sammy Rosso <[email protected]>
What type of PR is this?
Other
What does this PR do? Why is it needed?
deprecates the wait for activation event stream. This PR simplifies the checks for validator activation by polling against the status every epoch instead of receiving gRPC streams. By implementing this way we move one step closer to migrating to a full REST based validator client that can more easily connect with beacon nodes from other clients.
tested with web UI in holesky
Which issues(s) does this PR fix?
Fixes #
Other notes for review
Acknowledgements