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

Question about eligible validators in rewards/penalties processing #857

Closed
NIC619 opened this issue Mar 30, 2019 · 3 comments
Closed

Question about eligible validators in rewards/penalties processing #857

NIC619 opened this issue Mar 30, 2019 · 3 comments
Labels
general:bug Something isn't working

Comments

@NIC619
Copy link
Contributor

NIC619 commented Mar 30, 2019

In spec v0.5.1, eligible validators are active validators in previous epoch:

    # v0.5.1
    # Process rewards or penalties for all validators
    for index in get_active_validator_indices(state.validator_registry, get_previous_epoch(state)):
        ...

However they are changed to current epoch active validators in d1d1b73 but not mentioned in the commit message or PR description so I wonder if this is intended?

    # dev
    eligible_validators = [
        index for index, validator in enumerate(state.validator_registry)
        if (
            is_active_validator(validator, current_epoch) or
            (validator.slashed and current_epoch < validator.withdrawable_epoch)
        )
    ]
    # Process rewards or penalties for all validators
    for index in eligible_validators:

And does it makes sense to change all validators in the comment # Process rewards or penalties for all validators to be something more specific?

@djrtwo
Copy link
Contributor

djrtwo commented Apr 7, 2019

You're right, this would be the previous epoch

@djrtwo
Copy link
Contributor

djrtwo commented Apr 17, 2019

This is being addressed in #949

@hwwhww hwwhww added the general:bug Something isn't working label Apr 19, 2019
@hwwhww hwwhww added this to the Phase 0 Frozen milestone Apr 19, 2019
@hwwhww
Copy link
Contributor

hwwhww commented May 6, 2019

closing in favor of #949

@hwwhww hwwhww closed this as completed May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants