This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Payout function should refund #8428
Copy link
Copy link
Closed
Labels
I9-optimisationAn enhancement to provide better overall performance in terms of time-to-completion for a task.An enhancement to provide better overall performance in terms of time-to-completion for a task.U2-some_time_soonIssue is worth doing soon.Issue is worth doing soon.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Z6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Description
Current payout function of staking assumes that any payout pays exactly T::MaxNominationPerValidator accounts, not to mention that it also assumes the worse case of account target as well: Staked.
We should make this refund along two axes:
- If we pay
Xnominators, we should take this into account. - Each payout variant should have its own weight benchmark, and we must add them up. So the function will still use the upfront worse case weight, but will refund quite a bit along the way.
Once we have this, we can bump the MaxNominationPerValidator to a much larger number safely, effectively nilling the chance of oversubscribed nominators.
related paritytech/polkadot#2637
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
I9-optimisationAn enhancement to provide better overall performance in terms of time-to-completion for a task.An enhancement to provide better overall performance in terms of time-to-completion for a task.U2-some_time_soonIssue is worth doing soon.Issue is worth doing soon.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Z6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Type
Projects
Status
✅ Done