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 status transition issues #225

Closed
3 of 4 tasks
hwwhww opened this issue Dec 4, 2018 · 2 comments
Closed
3 of 4 tasks

Validator status transition issues #225

hwwhww opened this issue Dec 4, 2018 · 2 comments
Labels
general:bug Something isn't working

Comments

@hwwhww
Copy link
Contributor

hwwhww commented Dec 4, 2018

Issues

  • 1. The current spec doesn't describe how PENDING_EXIT transits to EXITED_WITHOUT_PENALTY. A draft diagram:
    validator_state_transition
    (Please let me know if anything incorrect or unclear.)

  • 2. Potential min_empty_validator_index() issue: follow up this comment. Agreed with @djrtwo. IMO It doesn't make sense to allow the validators who have sent voluntary exit/withdraw message to make a top-up deposit.
    edited: just noticed the second case: involuntary ACTIVE -> PENDING_EXIT when v.balance < MIN_BALANCE.

  • 3. COLLECTIVE_PENALTY_CALCULATION_PERIOD and "withdrawal period": In the codes, we use COLLECTIVE_PENALTY_CALCULATION_PERIOD while it is described as "withdrawal period" everywhere.

  • 4. get_active_validator_indices returns both ACTIVE and PENDING_EXIT validators.

    def get_active_validator_indices(validators: [ValidatorRecord]) -> List[int]:
        """
        Gets indices of active validators from ``validators``.
        """
        return [i for i, v in enumerate(validators) if v.status in [ACTIVE, PENDING_EXIT]]

    Maybe we should rename ACTIVE status to another name?

Proposed solution

For issue 1

  1. @djrtwo suggested: https://github.com/ethereum/eth2.0-specs/pull/185/files#r237660001
    get_changed_validators() needs to check if state == PENDING_EXIT and then immediately set state = EXITED_WITHOUT_PENALTY.
  2. Add the stub of the actual withdraw. For testing withdraw, maybe we can actually set v.balance=0 and note that the balance will be transferred to shard chain in phase 1.

potentially related to #198?

@hwwhww hwwhww added the general:bug Something isn't working label Dec 4, 2018
@djrtwo
Copy link
Contributor

djrtwo commented Dec 4, 2018

1, 2, and 4 addressed in #228

@djrtwo
Copy link
Contributor

djrtwo commented Dec 11, 2018

Closing. The rest of the penalty issues are reference in a specific penalty issue #196

@djrtwo djrtwo closed this as completed Dec 11, 2018
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

2 participants