permissionless bond_extra in nomination pools#12608
permissionless bond_extra in nomination pools#12608paritytech-processbot[bot] merged 63 commits intoparitytech:masterfrom
bond_extra in nomination pools#12608Conversation
bond_extra
|
Ideally this action should not be at any cost to pool operators? Asked this because I had no idea incentives were not offered to pool operators. |
frame/nomination-pools/src/lib.rs
Outdated
| // TODO: For when the pool member leaves or is kiked out, clear storage. | ||
| // Update weight info | ||
| #[pallet::weight(T::DbWeight::get().reads_writes(1, 1))] | ||
| pub fn set_claimable_action(origin: OriginFor<T>, action: bool) -> DispatchResult { |
There was a problem hiding this comment.
Action should be an enum with better names about what each variant mean.
There was a problem hiding this comment.
And then impl Default for Action should be whatever it is the current behavior, so that we won't need any migration.
There was a problem hiding this comment.
Making it an enum would be preferred because this makes it into a binary state and more actions can be added if needed.
There was a problem hiding this comment.
so that we won't need any migration.
I am curious as to why we should avoid making migrations in this case?
There was a problem hiding this comment.
When a member unbond should that change action back to default?
There was a problem hiding this comment.
I am curious as to why we should avoid making migrations in this case?
If you have a map for user's desired behavior, then you won't need a migration.
If you want to add this as a new filed to the Member, which is arguably the more "neat" way of doing this, then you would need a migration.
For now, the map approach is fine. But if you are down for it, I am down to experiment with the alternative as well.
When a member unbond should that change action back to default?
Can you elaborate on the scenario? I don't think unbond would have anything to do with this. When the member fully unbonds and leaves the system, then their entry in this map should also be removed.
|
We discussed this internally and our interim opinion is to not add a new role for this, and not attach it to root either. If a user allows this, ANYONE should be able to claim their rewards. WDYT @Doordashcon? (we will soon post this in the polkadot forum as well to get more feedback from the existing pool operators.) |
Sounds good @kianenigma i'll wait till it's up on the forum before implementing changes. |
|
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/roles-in-nomination-pools/1169/5 |
kianenigma
left a comment
There was a problem hiding this comment.
I think we can move forward with this. Needs a few renames and tweaks, but in general is looking good.
|
bot fmt |
|
@rossbulat https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2423241 was started for your command Comment |
|
@rossbulat Command |
|
bot rebase |
|
Rebased |
|
bot rebase |
|
Rebased |
|
bot merge |
* create enum * logic check * add benchmarks * -enum * update * bond extra other * update * update * update * cargo fmt * Permissioned * update * cargo fmt * update * update index * doc update Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> * doc update Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * cargo fmt * bond_extra auto compound * bond_extra_other * Apply suggestions from code review * Fixes from kian * updates docs & test * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * fixes + fmt * expand ClaimPermissions + add benchmarks * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_nomination_pools * tidy up claim payout benches * fix * + test: claim_payout_other_works * comments, rename to set_claim_permission * fix comment * remove ClaimPermission on leave pool * fix test * ".git/.scripts/commands/fmt/fmt.sh" * + test for ClaimPermissions::remove() * impl can_bond_extra & can_claim_payout --------- Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: parity-processbot <> Co-authored-by: Ross Bulat <ross@parity.io>
* create enum * logic check * add benchmarks * -enum * update * bond extra other * update * update * update * cargo fmt * Permissioned * update * cargo fmt * update * update index * doc update Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> * doc update Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * cargo fmt * bond_extra auto compound * bond_extra_other * Apply suggestions from code review * Fixes from kian * updates docs & test * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * fixes + fmt * expand ClaimPermissions + add benchmarks * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_nomination_pools * tidy up claim payout benches * fix * + test: claim_payout_other_works * comments, rename to set_claim_permission * fix comment * remove ClaimPermission on leave pool * fix test * ".git/.scripts/commands/fmt/fmt.sh" * + test for ClaimPermissions::remove() * impl can_bond_extra & can_claim_payout --------- Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: parity-processbot <> Co-authored-by: Ross Bulat <ross@parity.io>
|
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: |
* create enum * logic check * add benchmarks * -enum * update * bond extra other * update * update * update * cargo fmt * Permissioned * update * cargo fmt * update * update index * doc update Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> * doc update Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * cargo fmt * bond_extra auto compound * bond_extra_other * Apply suggestions from code review * Fixes from kian * updates docs & test * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * fixes + fmt * expand ClaimPermissions + add benchmarks * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_nomination_pools * tidy up claim payout benches * fix * + test: claim_payout_other_works * comments, rename to set_claim_permission * fix comment * remove ClaimPermission on leave pool * fix test * ".git/.scripts/commands/fmt/fmt.sh" * + test for ClaimPermissions::remove() * impl can_bond_extra & can_claim_payout --------- Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: parity-processbot <> Co-authored-by: Ross Bulat <ross@parity.io>
* create enum * logic check * add benchmarks * -enum * update * bond extra other * update * update * update * cargo fmt * Permissioned * update * cargo fmt * update * update index * doc update Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> * doc update Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * cargo fmt * bond_extra auto compound * bond_extra_other * Apply suggestions from code review * Fixes from kian * updates docs & test * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/tests.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/tests.rs * fixes + fmt * expand ClaimPermissions + add benchmarks * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_nomination_pools * tidy up claim payout benches * fix * + test: claim_payout_other_works * comments, rename to set_claim_permission * fix comment * remove ClaimPermission on leave pool * fix test * ".git/.scripts/commands/fmt/fmt.sh" * + test for ClaimPermissions::remove() * impl can_bond_extra & can_claim_payout --------- Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: parity-processbot <> Co-authored-by: Ross Bulat <ross@parity.io>
Resolves #11638
polkadot address: 12zsKEDVcHpKEWb99iFt3xrTCQQXZMu477nJQsTBBrof5k2h
polkadot companion: paritytech/polkadot#6753