This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Conversation
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
Make use of the new `OriginPrivilegeCmp` feature of pallet scheduler. The idea is to make sure that a council origin with more yes votes has higher privileges than a council origin with less yes votes. This solves a problem that happened recently on Kusama where the council tried to cancel a scheduled task, but that required that the same council origin was used while the cancel motion had more yes votes than the origin motion that scheduled this task. With this origin privilege compare it should now be solved by checking the yes votes directly.
bkchr
added
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit.
labels
Oct 28, 2021
gui1117
approved these changes
Oct 28, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, maybe comparing the proportion makes more sense
runtime/kusama/src/lib.rs
Outdated
( | ||
OriginCaller::Council(pallet_collective::RawOrigin::Members(l_yes_votes, _)), | ||
OriginCaller::Council(pallet_collective::RawOrigin::Members(r_yes_votes, _)), | ||
) => Some(l_yes_votes.cmp(r_yes_votes)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it would make more sense to check the proportion, consider the ScheduleOrigin is a proportion check.
We can use Perbill, u64 (as long as count is u32) or biguint
shawntabrizi
approved these changes
Oct 29, 2021
Waiting for commit status. |
emostov
pushed a commit
that referenced
this pull request
Nov 1, 2021
* Introduce `OriginPrivilegeCmp` Make use of the new `OriginPrivilegeCmp` feature of pallet scheduler. The idea is to make sure that a council origin with more yes votes has higher privileges than a council origin with less yes votes. This solves a problem that happened recently on Kusama where the council tried to cancel a scheduled task, but that required that the same council origin was used while the cancel motion had more yes votes than the origin motion that scheduled this task. With this origin privilege compare it should now be solved by checking the yes votes directly. * Feedback * update lockfile for substrate Co-authored-by: parity-processbot <>
23 tasks
wischli
added a commit
to KILTprotocol/kilt-node
that referenced
this pull request
Jan 31, 2022
Scheduler: paritytech/substrate#10356 OriginPriviligeCmp: paritytech/polkadot#4166
14 tasks
26 tasks
wischli
added a commit
to KILTprotocol/kilt-node
that referenced
this pull request
Feb 9, 2022
* chore: bump Polkadot dependencies to v0.9.16 * refactor: use AllPalletsWithSystem hook * chore: remove crowdloan pallet * fix: apply no DefaultAccount check * fix: switch to default MaxEncodedLen paritytech/substrate#10662 * fix: apply asset quota + runtime state_version quota: paritytech/substrate#10382 state: paritytech/substrate#9732 * fix: Preimage registrar and Scheduler integration Scheduler: paritytech/substrate#10356 OriginPriviligeCmp: paritytech/polkadot#4166 * fix: OrderedSet * fix: apply new fork_id to chainspecs paritytech/substrate#10463 * fix: apply no default account for SudoConfig * fix: apply name changes for GrandPa paritytech/substrate#10463 * fix: EnsureOneOf paritytech/substrate#10379 * fix: preimage weights * fix: parachain client * fix: clippy copied weights * fix: bump deps * tests: attempt staking fix * bench: attempt to fix default accountid for dids * fix: staking unit test pallet order execution * fix: did unit benchmarks * fix: fmt * fix: revert to old hook order execution * bench: run manually for preimage + scheduler * fix: only import TaskManager for try-runtime feature * fix: use correct scheduler migration + add logs * refactor: use explicit para runtime executors * fix: apply code review by @Diiaablo95 * chore: apply suggestion from @weichweich review * chore: bump deps * fix: deps
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make use of the new
OriginPrivilegeCmp
feature of pallet scheduler.The idea is to make sure that a council origin with more yes votes has
higher privileges than a council origin with less yes votes. This solves
a problem that happened recently on Kusama where the council tried to
cancel a scheduled task, but that required that the same council origin
was used while the cancel motion had more yes votes than the origin
motion that scheduled this task. With this origin privilege compare it
should now be solved by checking the yes votes directly.
paritytech/substrate#10078