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

Commit 7c334e2

Browse files
authored
Enable governance (#536)
* Enable governance * Tweak a few parameters
1 parent 1e6c88b commit 7c334e2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Diff for: runtime/src/lib.rs

+8-9
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,9 @@ impl SignedExtension for OnlyStakingAndClaims {
129129
-> TransactionValidity
130130
{
131131
match call {
132-
Call::Staking(_) | Call::Claims(_) | Call::Sudo(_) | Call::Session(_)
133-
| Call::ElectionsPhragmen(_) | Call::TechnicalMembership(_)
134-
| Call::TechnicalCommittee(_) | Call::Nicks(_)
135-
=>
136-
Ok(Default::default()),
137-
_ => Err(InvalidTransaction::Custom(ValidityError::NoPermission.into()).into()),
132+
Call::Balances(_) | Call::Slots(_) | Call::Registrar(_)
133+
=> Err(InvalidTransaction::Custom(ValidityError::NoPermission.into()).into()),
134+
_ => Ok(Default::default()),
138135
}
139136
}
140137
}
@@ -323,7 +320,8 @@ parameter_types! {
323320
// KUSAMA: These values are 1/4 of what we expect for the mainnet.
324321
pub const LaunchPeriod: BlockNumber = 7 * DAYS;
325322
pub const VotingPeriod: BlockNumber = 7 * DAYS;
326-
pub const EmergencyVotingPeriod: BlockNumber = 3 * HOURS;
323+
// KUSAMA: This is a bit short; should be increased to 3 hours.
324+
pub const EmergencyVotingPeriod: BlockNumber = 1 * HOURS;
327325
pub const MinimumDeposit: Balance = 100 * DOLLARS;
328326
pub const EnactmentPeriod: BlockNumber = 8 * DAYS;
329327
pub const CooloffPeriod: BlockNumber = 7 * DAYS;
@@ -341,7 +339,8 @@ impl democracy::Trait for Runtime {
341339
/// A straight majority of the council can decide what their next motion is.
342340
type ExternalOrigin = collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>;
343341
/// A super-majority can have the next scheduled referendum be a straight majority-carries vote.
344-
type ExternalMajorityOrigin = collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>;
342+
// KUSAMA: A majority can have the next scheduled legislation be majority-carries.
343+
type ExternalMajorityOrigin = collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>;
345344
/// A unanimous council can have the next scheduled referendum be a straight default-carries
346345
/// (NTB) vote.
347346
type ExternalDefaultOrigin = collective::EnsureProportionAtLeast<_1, _1, AccountId, CouncilCollective>;
@@ -366,7 +365,7 @@ impl collective::Trait<CouncilCollective> for Runtime {
366365
parameter_types! {
367366
pub const CandidacyBond: Balance = 100 * DOLLARS;
368367
pub const VotingBond: Balance = 5 * DOLLARS;
369-
pub const TermDuration: BlockNumber = 10 * MINUTES;
368+
pub const TermDuration: BlockNumber = 2 * HOURS;
370369
pub const DesiredMembers: u32 = 13;
371370
pub const DesiredRunnersUp: u32 = 7;
372371
}

0 commit comments

Comments
 (0)