Eth2.0-specs: Validator status transition issues

Created on 4 Dec 2018  路  2Comments  路  Source: ethereum/eth2.0-specs

Issues

  • [x] 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.)

  • [x] 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.

  • [x] 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?

bug

Most helpful comment

1, 2, and 4 addressed in #228

All 2 comments

1, 2, and 4 addressed in #228

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spble picture spble  路  28Comments

JustinDrake picture JustinDrake  路  12Comments

protolambda picture protolambda  路  18Comments

prestonvanloon picture prestonvanloon  路  17Comments

vbuterin picture vbuterin  路  13Comments