-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Staking] Split candidate state for PoV optimization (#1117)
* join candidates leave candidates go online offline * wip * still wip on delegation changes * in progress much more complicated now because of the necessity of maintaining Total storage item and im unsure we need it * add highest bottom delegation amount to candidate metadata and start increase and decrease delegations * edge cases * complete impl still needs tests * impl more efficient candidate snapshot * passing unit pallet units but need to update migration unit test * fix some benchmark and save start migration * migration impl with minimal pre post checks * more tests and make all bound checks more strict * patch sorted insertion bug to enforce first come first serve for delegations with same amount * patch patch * update configs and need to update the migration * fix migration to work if old bottom delegations len is greater than the configured max bottom delegations per candidate * save * update parachain staking precompile * fmt * fix 1 of 4 migration tests * wip last migration test * complete migration testing of revocation and exit delegator paths * update TS test * update most weights * update round transition on initialize * fix TS test * replace unstable sorts with stable sorts * set max bottom delegations per candidate to 50 * insert highest bottom into top when removing a top delegation * address most comments * update benchmarking code and add weight hint unit test for execute leave candidates * update only benchmarks that changed a lot relative to existing weights * address most review comments * address edge case and fix comments
- Loading branch information
Showing
13 changed files
with
3,626 additions
and
1,340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.