You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. The current spec doesn't describe how PENDING_EXIT transits to EXITED_WITHOUT_PENALTY. A draft diagram:
(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.
defget_active_validator_indices(validators: [ValidatorRecord]) ->List[int]:
""" Gets indices of active validators from ``validators``. """return [ifori, vinenumerate(validators) ifv.statusin [ACTIVE, PENDING_EXIT]]
Maybe we should rename ACTIVE status to another name?
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.
Issues
1. The current spec doesn't describe how
PENDING_EXIT
transits toEXITED_WITHOUT_PENALTY
. A draft diagram:(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
whenv.balance < MIN_BALANCE
.3.
COLLECTIVE_PENALTY_CALCULATION_PERIOD
and "withdrawal period": In the codes, we useCOLLECTIVE_PENALTY_CALCULATION_PERIOD
while it is described as "withdrawal period" everywhere.4.
get_active_validator_indices
returns bothACTIVE
andPENDING_EXIT
validators.Maybe we should rename
ACTIVE
status to another name?Proposed solution
For issue 1
get_changed_validators()
needs to checkif state == PENDING_EXIT
and then immediately setstate = EXITED_WITHOUT_PENALTY
.v.balance=0
and note that the balance will be transferred to shard chain in phase 1.potentially related to #198?
The text was updated successfully, but these errors were encountered: