Repository navigation
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Goal
Make OperatorBond.locked_lamports track the operator stake reserved by active challenge-mode commitments.
Why
RegisterOperator initializes locked_lamports to zero, but no instruction changes it. ProposeCommitment checks that the operator has enough stake without reserving any of it. The same stake can therefore support any number of pending commitments.
Future withdrawal instructions also need this value. They must know how much stake is still tied to unfinished commitments before allowing the operator to withdraw.
Design Decisions
Decide and document:
- how much stake each pending commitment locks;
- whether the amount is fixed, configured per cluster, or based on the committed account;
- when a commitment releases its lock;
- how expiry, cancellation, finalization, and each dispute outcome affect the lock;
- what happens to locked stake when the operator is slashed; and
- how many commitments one bond can support at the same time.
Scope
- Reject a new commitment when the operator does not have enough unlocked stake.
- Increase
locked_lamportswhenProposeCommitmentsuccessfully creates a pending commitment. - Release or slash the reserved stake exactly once at the lifecycle point selected by the design.
- Prevent stake withdrawal while that stake remains locked.
- Handle several pending commitments without overflow or double release.
- Keep the lock tied to the cluster-scoped
OperatorBond, including across validator rotation. - Add tests for concurrent commitments, insufficient unlocked stake, every release path, slashing, and withdrawal checks.
- Update the implementation notes with the selected rules.
Related work:
- Implement RegisterOperator #207 creates the operator bond.
- Implement RequestStakeWithdrawal #210 and Implement WithdrawStake #211 implement stake withdrawal and depend on correct lock accounting.
- Implement ProposeCommitment #212 creates pending commitments.
- Implement ResolveDispute #223 resolves disputes and may slash the operator.
- Implement FinalizeCommitment #224 finalizes commitments.
Outcome
One amount of operator stake cannot protect unlimited pending commitments, and stake that still protects a commitment cannot be withdrawn.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity