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

Simplify validator startup checks to wait for beacon node synced #5345

Closed
0xKiwi opened this issue Apr 8, 2020 · 0 comments · Fixed by #5366
Closed

Simplify validator startup checks to wait for beacon node synced #5345

0xKiwi opened this issue Apr 8, 2020 · 0 comments · Fixed by #5366
Assignees

Comments

@0xKiwi
Copy link
Contributor

0xKiwi commented Apr 8, 2020

Currently the validator has multiple processes it runs before performing validator duties, these include: WaitForChainStart, WaitForSync and WaitForActivation.

WaitForSync and WaitForActivation both currently ping once for information, and after that they run every 6 seconds to check for the information the validator client needs. If the beacon node is not ready to return the information asked for at the time of request, the validator receives another response every 6 seconds after.

One issue discovered and explained to @rauljordan is that the first request of WaitForSync and WaitForActivation both fail initially after chain start, and fallback to the 6 second delay.

The validator should not use WaitForChainStart and WaitForSync for notification on when it should act if the beacon chain node is not ready yet by the time, we should instead use StateFeed.Initialized or a new StateFeed.Synced for tracking when the beacon node is ready to communicate with the validator client.

@0xKiwi 0xKiwi self-assigned this Apr 9, 2020
@0xKiwi 0xKiwi added the Refactor label Apr 9, 2020
@0xKiwi 0xKiwi changed the title Simplify validator startup checks to wait for state initialization Simplify validator startup checks to wait for beacon node synced Apr 9, 2020
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 a pull request may close this issue.

1 participant