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

Inclusion slots and attestations [bug] #749

Closed
protolambda opened this issue Mar 10, 2019 · 1 comment
Closed

Inclusion slots and attestations [bug] #749

protolambda opened this issue Mar 10, 2019 · 1 comment

Comments

@protolambda
Copy link
Contributor

Not every active validator may have an included attestation in the previous epoch (unlikely, but possible and enactable).

Now if the rewards are calculated, the proposer is awarded, based on inclusion distance to all active validators. There is no known distance however for such an active (as in activated) but inactive (as in not attesting in previous epoch) validator.

for index in get_active_validator_indices(state.validator_registry, get_previous_epoch(state)):
    ...
    proposer_index = get_beacon_proposer_index(state, inclusion_slot(state, index))

This should be checking if there was any such attestation, and only then get the proposer index based on the inclusion slot.

If you don't have attestations for an active validator, the chain gets stuck because of an error. Should be an easy fix however.

@djrtwo
Copy link
Contributor

djrtwo commented Mar 10, 2019

This is already being addressed in #744 :)

@djrtwo djrtwo closed this as completed Mar 10, 2019
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

No branches or pull requests

2 participants