Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
aadfd4b
Introduce `cancel_proposal`
gavofyork Sep 15, 2020
a67a018
Support proposal cancellation from runtime.
gavofyork Sep 15, 2020
bec8bad
Fixes
gavofyork Sep 15, 2020
06c97f2
Fixes
gavofyork Sep 15, 2020
693fc82
Fixes
gavofyork Sep 15, 2020
bbe86b6
Fixes
gavofyork Sep 16, 2020
083ba8d
Fixes
gavofyork Sep 16, 2020
3626e8e
Fixes
gavofyork Sep 16, 2020
c93eedb
Fixes
gavofyork Sep 16, 2020
2274fa3
Merge remote-tracking branch 'origin/master' into gav-cancel-proposal
gavofyork Sep 17, 2020
400d8e4
Merge remote-tracking branch 'origin/master' into gav-cancel-proposal
gavofyork Sep 17, 2020
a8e9fe8
Fix benchmarks
shawntabrizi Sep 21, 2020
764ea77
fix benchmark
shawntabrizi Sep 21, 2020
a5dfded
whitelisted caller weights
shawntabrizi Sep 21, 2020
4aaa1e8
Merge branch 'master' into gav-cancel-proposal
shawntabrizi Sep 22, 2020
a36189f
fix build
shawntabrizi Sep 22, 2020
1254cf6
Merge remote-tracking branch 'origin/master' into gav-cancel-proposal
gavofyork Sep 23, 2020
f60cccc
Fixes
gavofyork Sep 23, 2020
13cace0
Fixes
gavofyork Sep 23, 2020
02e4fe8
Fixes
gavofyork Sep 23, 2020
88dc626
Fixes
gavofyork Sep 23, 2020
a1ebcb1
Merge remote-tracking branch 'origin/master' into gav-cancel-proposal
gavofyork Sep 23, 2020
775b637
Update frame/democracy/src/lib.rs
gavofyork Sep 24, 2020
9c0cf8d
Fixes
gavofyork Sep 24, 2020
2ba9cdd
Fixes
gavofyork Sep 24, 2020
847414f
Merge branch 'gav-cancel-proposal' of github.com:paritytech/substrate…
gavofyork Sep 24, 2020
4ecbddf
Fixes
gavofyork Sep 24, 2020
2f84c91
Fixes
gavofyork Sep 24, 2020
42b9093
Fixes
gavofyork Sep 24, 2020
97af811
doc updates
shawntabrizi Sep 24, 2020
b466e1f
new weights
shawntabrizi Sep 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Support proposal cancellation from runtime.
  • Loading branch information
gavofyork committed Sep 15, 2020
commit a67a0180c9e0363e89273833a892c95ed7357a2b
7 changes: 7 additions & 0 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,13 @@ impl pallet_democracy::Trait for Runtime {
type FastTrackVotingPeriod = FastTrackVotingPeriod;
// To cancel a proposal which has been passed, 2/3 of the council must agree to it.
type CancellationOrigin = pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>;
// To cancel a proposal before it has been passed, the technical committee must be unanimous or
// Root must agree.
type CancelProposalOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>,
>;
// Any single technical committee member may veto a coming council proposal, however they can
// only do it once and it lasts only for the cooloff period.
type VetoOrigin = pallet_collective::EnsureMember<AccountId, TechnicalCollective>;
Expand Down
4 changes: 4 additions & 0 deletions bin/node/runtime/src/weights/pallet_democracy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ impl pallet_democracy::WeightInfo for WeightInfo {
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn cancel_proposal() -> Weight {
(20431000 as Weight)
.saturating_add(DbWeight::get().writes(1 as Weight))
}
fn cancel_referendum() -> Weight {
(20431000 as Weight)
.saturating_add(DbWeight::get().writes(1 as Weight))
Expand Down