Skip to content

feat: move deposit/withdrawal/stake processing into ConsensusState#440

Open
matthias-wright wants to merge 35 commits into
mainfrom
m/refactor-deposit-withdrawal
Open

feat: move deposit/withdrawal/stake processing into ConsensusState#440
matthias-wright wants to merge 35 commits into
mainfrom
m/refactor-deposit-withdrawal

Conversation

@matthias-wright

Copy link
Copy Markdown
Collaborator

This reworks how Summit handles deposits, withdrawals, staking, and committee transitions: the logic moves out of the finalizer actor and into ConsensusState, making the state transition self-contained, deterministic, and unit-testable without the finalizer/EL harness.
This also addresses #339 and #362, superseding #379 and #397.

Changes:

  • Move execution request (deposit, withdrawal, etc) processing from the finalizer actor into the ConsensusState.
  • Execution requests are no longer parsed on arrival. They are only buffered.
  • Withdrawal queue format was simplified, withdrawals are no longer keyed by validator key.
  • Balance is no longer deducted when the withdrawal request arrives. The withdrawal amount is deducted from the balance only after the withdrawal lands in a block.
  • Partial withdrawal requests for active validators are clamped to avoid withdrawing the balance below MinimumStake.
  • Removed MaximumStake param, validators can stake as much as they want.
  • When MinimumStake is increased, validators with balance < MinimumStake are still removed from the committee (if the resulting committee size is still larger than a defined minimum), but the remaining balance is no longer withdrawn automatically. Removed validators may withdraw their balance at any time.
  • Removed the has_pending_deposit and has_pending_withdrawal fields from the validator accounts.
  • Added FullPayoutPending to distinguish a validator that has left the committee with its full balance committed to a pending payout (must not rejoin) from a plain Inactive validator (out of committee, keeps its balance, may rejoin via a top-up and may hold a pending partial withdrawal). Without the FullPayoutPending, an incoming deposit would re-activate a validator whose entire balance is about to be withdrawn.
  • Reject unverified-block withdrawals before EL forkchoice adoption.
  • Clamp terminal-block payouts against a raised minimum.

@matthias-wright matthias-wright force-pushed the m/refactor-deposit-withdrawal branch 2 times, most recently from 417d76d to 05d0b07 Compare July 7, 2026 14:13
@matthias-wright matthias-wright force-pushed the m/refactor-deposit-withdrawal branch from 05d0b07 to 6ffc5ec Compare July 8, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant