Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Enable governance #536

Merged
merged 2 commits into from
Nov 4, 2019
Merged
Changes from all commits
Commits
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
17 changes: 8 additions & 9 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,9 @@ impl SignedExtension for OnlyStakingAndClaims {
-> TransactionValidity
{
match call {
Call::Staking(_) | Call::Claims(_) | Call::Sudo(_) | Call::Session(_)
| Call::ElectionsPhragmen(_) | Call::TechnicalMembership(_)
| Call::TechnicalCommittee(_) | Call::Nicks(_)
=>
Ok(Default::default()),
_ => Err(InvalidTransaction::Custom(ValidityError::NoPermission.into()).into()),
Call::Balances(_) | Call::Slots(_) | Call::Registrar(_)
=> Err(InvalidTransaction::Custom(ValidityError::NoPermission.into()).into()),
_ => Ok(Default::default()),
}
}
}
Expand Down Expand Up @@ -323,7 +320,8 @@ parameter_types! {
// KUSAMA: These values are 1/4 of what we expect for the mainnet.
pub const LaunchPeriod: BlockNumber = 7 * DAYS;
pub const VotingPeriod: BlockNumber = 7 * DAYS;
pub const EmergencyVotingPeriod: BlockNumber = 3 * HOURS;
// KUSAMA: This is a bit short; should be increased to 3 hours.
pub const EmergencyVotingPeriod: BlockNumber = 1 * HOURS;
pub const MinimumDeposit: Balance = 100 * DOLLARS;
pub const EnactmentPeriod: BlockNumber = 8 * DAYS;
pub const CooloffPeriod: BlockNumber = 7 * DAYS;
Expand All @@ -341,7 +339,8 @@ impl democracy::Trait for Runtime {
/// A straight majority of the council can decide what their next motion is.
type ExternalOrigin = collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>;
/// A super-majority can have the next scheduled referendum be a straight majority-carries vote.
type ExternalMajorityOrigin = collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>;
// KUSAMA: A majority can have the next scheduled legislation be majority-carries.
type ExternalMajorityOrigin = collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>;
/// A unanimous council can have the next scheduled referendum be a straight default-carries
/// (NTB) vote.
type ExternalDefaultOrigin = collective::EnsureProportionAtLeast<_1, _1, AccountId, CouncilCollective>;
Expand All @@ -366,7 +365,7 @@ impl collective::Trait<CouncilCollective> for Runtime {
parameter_types! {
pub const CandidacyBond: Balance = 100 * DOLLARS;
pub const VotingBond: Balance = 5 * DOLLARS;
pub const TermDuration: BlockNumber = 10 * MINUTES;
pub const TermDuration: BlockNumber = 2 * HOURS;
pub const DesiredMembers: u32 = 13;
pub const DesiredRunnersUp: u32 = 7;
}
Expand Down