Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[collator-selection] Add delay to candidate deposit withdrawals #7317

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

georgepisaltu
Copy link
Contributor

Currently, the collator selection pallet allows accounts to take the place of others in the candidate list by placing a higher bond than them. While the new candidate cannot lower their bond, they can leave the candidate set later and quickly rejoin with a lower deposit if nobody is watching to take their place by frontrunning the transaction. While this doesn't pose functional threats to the collator election system, it is undesirable behavior.

This PR solves this issue by introducing an unbonding period for candidates that leave the set voluntarily or that are kicked due to inactivity. In this case, the deposit is held until the unbonding period passes. Then, the funds can be released using the new withdraw_unbonded extrinsic call. Accounts that start unbonding cannot rejoin as candidates until the unbonding period has finished.

Signed-off-by: georgepisaltu <[email protected]>
Signed-off-by: georgepisaltu <[email protected]>
Signed-off-by: georgepisaltu <[email protected]>
Signed-off-by: georgepisaltu <[email protected]>
@georgepisaltu georgepisaltu added the T2-pallets This PR/Issue is related to a particular pallet. label Jan 23, 2025
@georgepisaltu
Copy link
Contributor Author

/cmd prdoc --audience runtime_dev --bump minor

Signed-off-by: georgepisaltu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant