Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
bba14546
Commit
bba14546
authored
4 years ago
by
Gavin Wood
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Allow voting in democracy (#1331)
* Allow voting in democracy. * Ensire Root can begin referenda
parent
2a3e607d
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
polkadot/runtime/polkadot/src/lib.rs
+30
-7
30 additions, 7 deletions
polkadot/runtime/polkadot/src/lib.rs
with
30 additions
and
7 deletions
polkadot/runtime/polkadot/src/lib.rs
+
30
−
7
View file @
bba14546
...
...
@@ -110,7 +110,12 @@ pub struct BaseFilter;
impl
Filter
<
Call
>
for
BaseFilter
{
fn
filter
(
call
:
&
Call
)
->
bool
{
match
call
{
Call
::
Parachains
(
parachains
::
Call
::
set_heads
(
..
))
=>
true
,
Call
::
Parachains
(
parachains
::
Call
::
set_heads
(
..
))
|
Call
::
Democracy
(
democracy
::
Call
::
vote
(
..
))
|
Call
::
Democracy
(
democracy
::
Call
::
remove_vote
(
..
))
|
Call
::
Democracy
(
democracy
::
Call
::
delegate
(
..
))
|
Call
::
Democracy
(
democracy
::
Call
::
undelegate
(
..
))
=>
true
,
// Governance stuff
Call
::
Democracy
(
_
)
|
Call
::
Council
(
_
)
|
Call
::
TechnicalCommittee
(
_
)
|
...
...
@@ -394,20 +399,38 @@ impl democracy::Trait for Runtime {
type
VotingPeriod
=
VotingPeriod
;
type
MinimumDeposit
=
MinimumDeposit
;
/// A straight majority of the council can decide what their next motion is.
type
ExternalOrigin
=
collective
::
EnsureProportionAtLeast
<
_1
,
_2
,
AccountId
,
CouncilCollective
>
;
type
ExternalOrigin
=
system
::
EnsureOneOf
<
AccountId
,
collective
::
EnsureProportionAtLeast
<
_1
,
_2
,
AccountId
,
CouncilCollective
>
,
system
::
EnsureRoot
<
AccountId
>
,
>
;
/// A 60% super-majority can have the next scheduled referendum be a straight majority-carries vote.
type
ExternalMajorityOrigin
=
collective
::
EnsureProportionAtLeast
<
_3
,
_5
,
AccountId
,
CouncilCollective
>
;
type
ExternalMajorityOrigin
=
system
::
EnsureOneOf
<
AccountId
,
collective
::
EnsureProportionAtLeast
<
_3
,
_5
,
AccountId
,
CouncilCollective
>
,
system
::
EnsureRoot
<
AccountId
>
,
>
;
/// A unanimous council can have the next scheduled referendum be a straight default-carries
/// (NTB) vote.
type
ExternalDefaultOrigin
=
collective
::
EnsureProportionAtLeast
<
_1
,
_1
,
AccountId
,
CouncilCollective
>
;
type
ExternalDefaultOrigin
=
system
::
EnsureOneOf
<
AccountId
,
collective
::
EnsureProportionAtLeast
<
_1
,
_1
,
AccountId
,
CouncilCollective
>
,
system
::
EnsureRoot
<
AccountId
>
,
>
;
/// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote
/// be tabled immediately and with a shorter voting/enactment period.
type
FastTrackOrigin
=
collective
::
EnsureProportionAtLeast
<
_2
,
_3
,
AccountId
,
TechnicalCollective
>
;
type
InstantOrigin
=
collective
::
EnsureProportionAtLeast
<
_1
,
_1
,
AccountId
,
TechnicalCollective
>
;
type
FastTrackOrigin
=
system
::
EnsureOneOf
<
AccountId
,
collective
::
EnsureProportionAtLeast
<
_2
,
_3
,
AccountId
,
TechnicalCollective
>
,
system
::
EnsureRoot
<
AccountId
>
,
>
;
type
InstantOrigin
=
system
::
EnsureOneOf
<
AccountId
,
collective
::
EnsureProportionAtLeast
<
_1
,
_1
,
AccountId
,
TechnicalCollective
>
,
system
::
EnsureRoot
<
AccountId
>
,
>
;
type
InstantAllowed
=
InstantAllowed
;
type
FastTrackVotingPeriod
=
FastTrackVotingPeriod
;
// To cancel a proposal which has been passed, 2/3 of the council must agree to it.
type
CancellationOrigin
=
collective
::
EnsureProportionAtLeast
<
_2
,
_3
,
AccountId
,
CouncilCollective
>
;
type
CancellationOrigin
=
system
::
EnsureOneOf
<
AccountId
,
collective
::
EnsureProportionAtLeast
<
_2
,
_3
,
AccountId
,
CouncilCollective
>
,
system
::
EnsureRoot
<
AccountId
>
,
>
;
// 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
=
collective
::
EnsureMember
<
AccountId
,
TechnicalCollective
>
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment