Commit 76feb6f
[stake] settle expired pending_inactive on rejoin and reconfig (#13)
* test(stake): add failing tests for expired pending_inactive on rejoin
- assert that an inactive pool rejoining the validator set with expired
pending_inactive has that bucket settled to inactive by end of the
rejoining epoch
- assert that the framework's published voting power matches DKG's
recomputed view at the reconfig boundary, captured via
cur_validator_consensus_infos and next_validator_consensus_infos
- both fail on m1 today; will pass once the sweep is applied at validator
rejoin / next-epoch transition
* test(stake): add failing tests for rejoin gate and reconfig start-time helper
- assert join_validator_set rejects rejoin when post-settlement active stake (99) falls below minimum_stake despite expired pending_inactive padding the pre-sweep total
- assert get_reconfig_start_time_secs returns now_seconds() outside an active reconfiguration, instead of aborting via the inactive State variant
* fix(stake): settle expired pending_inactive on validator-set entry
- rename get_next_epoch_voting_power → get_voting_power; it is now a pure
bucket sum (pending_active + active + pending_inactive) and callers must
settle expired pending_inactive first
- add settle_expired_pending_inactive helper and invoke it on each
pending_active pool during on_new_epoch (using the reconfig start time
as the comparison clock) and on the joining pool in
join_validator_set_internal, so framework voting power agrees with DKG's
post-sweep view
- fix get_reconfig_start_time_secs to gate on is_in_progress() instead of
is_initialized() (permanently true after genesis), which would otherwise
return a stale start time outside an active reconfig and abort
start_time_secs()
- update stake.spec.move to use the renamed helper
* test(stake): update test_inactivate_no_excess_stake for post-fix rejoin timing
- prior commit settles expired pending_inactive into inactive at join_validator_set time, so the rejoining stake pool now has inactive=30000000003 and pending_inactive=0
- subsequent synchronize_delegation_pool advances the OLC, making the delegator's prior-cycle withdrawal inactive/withdrawable and eliminating the trailing pending_inactive in later assertions1 parent 13c5211 commit 76feb6f
3 files changed
Lines changed: 264 additions & 22 deletions
Lines changed: 22 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3367 | 3367 | | |
3368 | 3368 | | |
3369 | 3369 | | |
3370 | | - | |
3371 | | - | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
3372 | 3374 | | |
3373 | 3375 | | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
3374 | 3379 | | |
3375 | | - | |
3376 | | - | |
| 3380 | + | |
| 3381 | + | |
3377 | 3382 | | |
3378 | | - | |
| 3383 | + | |
3379 | 3384 | | |
3380 | | - | |
| 3385 | + | |
3381 | 3386 | | |
3382 | 3387 | | |
3383 | 3388 | | |
3384 | | - | |
| 3389 | + | |
3385 | 3390 | | |
3386 | | - | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
3387 | 3396 | | |
3388 | | - | |
3389 | | - | |
| 3397 | + | |
| 3398 | + | |
3390 | 3399 | | |
3391 | | - | |
3392 | | - | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
3393 | 3403 | | |
3394 | 3404 | | |
3395 | 3405 | | |
| |||
0 commit comments