fix: separate refund withdrawal scheduling + add invalid deposit tax#276
Conversation
|
This looks directionally correct for refund isolation and the withdrawal-queue decode invariants: validator withdrawals and deposit-refund withdrawals are now separated by kind, real exits keep their own capacity, process-time top-up refunds use synthetic refund keys, and decode now rejects the main inconsistent queue states. I have two questions:
|
612ee76 to
d6aa017
Compare
|
bf58202 to
074aa11
Compare
|
Mostly LGTM from me after the later commits. I think the core starvation issue is addressed: validator withdrawals and deposit-refund withdrawals now have separate schedules, validator withdrawals are selected first, and refunds no longer consume validator-exit capacity. One optional clarification: Is that intended as the new per-kind meaning of Small doc nit: |
074aa11 to
5430f89
Compare
|
Update(5430f89):
|
|
Looks good to me. Only small cleanup nits:
Other than that, I think the core issue is fixed. |
9f2be12 to
5119026
Compare
Builds on #276 (which builds on #275). Addresses #374. Changes: -Guard the Inactive deposit branch on account.balance > 0 to distinguish a staged-removal validator (still holds a credited balance) from a new-validator placeholder (balance 0). For the former, withdraw the full credited balance (balance_deduction = balance), refund the top-up separately, and let the completion path remove the account. Placeholders and active top-ups are unaffected. -Add regression test test_last_block_topup_does_not_drop_staged_removal_balance. -Refund staged-removal top-up untaxed.
Builds on #275.
Addresses #226 and #234.
Changes: