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

make getting assignments more generic #673

Merged
merged 5 commits into from
Feb 25, 2019
Merged

make getting assignments more generic #673

merged 5 commits into from
Feb 25, 2019

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Feb 21, 2019

addresses #668 by removing get_next_epoch_committee_assignment with the more generic get_committee_assignment that can get validator assignments for prev, current, and next epoch.


When querying for assignments in the next epoch there are two options -- with and without a `registry_change` -- which is the optional fourth parameter of the `get_committee_assignment`.

`get_committee_assignment` should be called at the start of each epoch to get the assignment for the next epoch (`current_epoch + 1`). A validator should always plan for assignments from both values of `registry_change` unless the validator can concretely eliminate one of the options. Planning for future assignments involves noting at which future slot one might have to attest and propose and also which shard one should begin syncing (in phase 1+).
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we need to mention if it's a genesis slot, get the assignment via (current_epoch)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll actually make a separate "chain start" section in another PR

Co-Authored-By: djrtwo <dannyjryan@gmail.com>
@djrtwo djrtwo requested a review from hwwhww February 22, 2019 15:35
Copy link
Contributor

@hwwhww hwwhww left a comment

Choose a reason for hiding this comment

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

LGTM!
Python sync: ethereum/trinity#301

@JustinDrake JustinDrake added the scope:v-guide Validator guide label Feb 22, 2019
@djrtwo djrtwo merged commit 8dbb732 into dev Feb 25, 2019
@djrtwo djrtwo deleted the genesis_committee_assign branch February 25, 2019 00:50
hwwhww added a commit to ethereum/trinity that referenced this pull request Feb 26, 2019
…eneric (#301)

* Address ethereum/eth2.0-spesc#673

* sync docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:v-guide Validator guide
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants