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

Validator services adjust with system time #2162

Closed
wants to merge 12 commits into from

Conversation

pawanjay176
Copy link
Member

Issue Addressed

Fixes #2052

Proposed Changes

Instead of running a repeated interval timer, the duties, attestation and fork services sleep for the required duration until the next slot/epoch and then run spawn their respective tasks.

@paulhauner
Copy link
Member

You should be able to fix the clippy lints by merging in unstable :)

@paulhauner
Copy link
Member

Just checking to make sure this is still a draft and not ready-for-review :)

@pawanjay176
Copy link
Member Author

Sorry, I lost sight of this guy 😅 Will merge unstable and do some more testing on this.

@pawanjay176 pawanjay176 marked this pull request as ready for review February 17, 2021 19:21
@paulhauner paulhauner added the ready-for-review The code is ready for review label Feb 24, 2021
Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

Just a few comments. There's also another timer here:

interval.tick().await;

I haven't had a chance to check out the simulator with 1s slot times, but I'll check that out once these comments are addressed :)

validator_client/src/attestation_service.rs Outdated Show resolved Hide resolved
validator_client/src/attestation_service.rs Outdated Show resolved Hide resolved
validator_client/src/duties_service.rs Outdated Show resolved Hide resolved
validator_client/src/fork_service.rs Outdated Show resolved Hide resolved
@paulhauner paulhauner added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Feb 26, 2021
@paulhauner
Copy link
Member

Just double-checking that this isn't ready for review :)

@pawanjay176 pawanjay176 added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Mar 1, 2021
@pawanjay176
Copy link
Member Author

Sorry forgot to mark it. It is ready for review!

@michaelsproul
Copy link
Member

I'm really keen to get this merged @pawanjay176, it looks great, but @paulhauner just went and revamped the whole duties service in the meantime 😩

There's a user on Discord who needs this PR, I think..

@michaelsproul michaelsproul self-assigned this Mar 16, 2021
@paulhauner
Copy link
Member

I can take care of merging this down once we get my optimise PR in :)

@paulhauner
Copy link
Member

Closing this since I merged it into #2243. Thanks for your work @pawanjay176!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review The code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants