Introduce `Payees` and `PayoutDestination` with `Split` variant
Tracking issue: https://github.com/paritytech/polkadot-sdk/issues/410 Polkadot companion: https://github.com/paritytech/polkadot/pull/7425
This PR is part 1 of a lazy migration to update reward destinations, which removes Controller, refactors RewardDestination into a new PayoutDestination enum, and adds an additional Split enum for the ability to compound a part of rewards and have the rest as free balance.
- [x] Create
PayoutDestinationwith new variants and introducePayeesstorage item to replacePayee. - [x]
set_payeeremovesPayee(RewardDestination) and inserts toPayees(PayoutDestination) - [x] Introduce
update_payeecall to lazily migrate fromPayeetoPayeesstorage item. - [x] Implement
Splitlogic onpayout_stakerswith getter that migratesPayeeto newPayeesstorage. - [x] Review staking benchmarks and ensure they are worst case scenario (Split, existing Payee).
- [x] Add tests again for fee-less
update_payee. - [x] Add tests for
get_payout_destination, ensurePayeesis populated.
bot help
bot bench $ pallet dev pallet_staking
bot bench $ pallet dev pallet_staking
bot clean
bot bench $ pallet dev pallet_staking
@rossbulat https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3066318 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_staking. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.
Comment bot cancel 26-5ac9ec4e-a310-4a5f-9d84-6e7fed12fe9e to cancel this command or bot cancel to cancel all commands in this pull request.
@rossbulat Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_staking has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3066318 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3066318/artifacts/download.
bot rebase
Rebased
bot rebase
Branch is already up-to-date
bot rebase
Rebased
bot bench $ pallet dev pallet_staking
@rossbulat https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3076574 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_staking. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.
Comment bot cancel 1-e2670b82-fa1e-4d42-afa9-6536221d5cbd to cancel this command or bot cancel to cancel all commands in this pull request.
@rossbulat Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_staking has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3076574 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3076574/artifacts/download.
bot rebase
Rebased
bot bench $ pallet dev pallet_staking
@rossbulat https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3076884 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_staking. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.
Comment bot cancel 2-96182715-da03-4f82-96c4-d512f894a727 to cancel this command or bot cancel to cancel all commands in this pull request.
@rossbulat Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_staking has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3076884 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3076884/artifacts/download.
bot rebase
Rebased
This pull request has been mentioned on Polkadot Forum. There might be relevant details there:
https://forum.polkadot.network/t/revision-of-rewarddestination-to-account-for-split-and-controller-removal/3360/1
bot rebase
Rebased
bot bench $ pallet dev pallet_staking
@rossbulat https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3198751 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_staking. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.
Comment bot cancel 7-68a9790e-3167-49ef-9b35-31b5d6692a3f to cancel this command or bot cancel to cancel all commands in this pull request.
@rossbulat Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_staking has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3198751 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3198751/artifacts/download.
bot rebase