Skip to content

Commit 115a0ef

Browse files
authored
Adjust gov params (#244)
* adjust governance parameters * adjust order
1 parent b5a50c6 commit 115a0ef

File tree

1 file changed

+39
-40
lines changed

1 file changed

+39
-40
lines changed

runtime/bifrost/src/lib.rs

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ impl pallet_balances::Config for Runtime {
289289
}
290290

291291
parameter_types! {
292-
pub const CouncilMotionDuration: BlockNumber = 3 * DAYS;
292+
pub const CouncilMotionDuration: BlockNumber = 2 * DAYS;
293293
pub const CouncilMaxProposals: u32 = 100;
294294
pub const CouncilMaxMembers: u32 = 100;
295295
}
@@ -307,41 +307,7 @@ impl pallet_collective::Config<CouncilCollective> for Runtime {
307307
}
308308

309309
parameter_types! {
310-
pub const CandidacyBond: Balance = 100 * CENTS;
311-
// 1 storage item created, key size is 32 bytes, value size is 16+16.
312-
pub const VotingBondBase: Balance = deposit(1, 64);
313-
// additional data per vote is 32 bytes (account id).
314-
pub const VotingBondFactor: Balance = deposit(0, 32);
315-
/// Daily council elections
316-
pub const TermDuration: BlockNumber = 24 * HOURS;
317-
pub const DesiredMembers: u32 = 19;
318-
pub const DesiredRunnersUp: u32 = 19;
319-
pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect";
320-
}
321-
322-
// Make sure that there are no more than MaxMembers members elected via phragmen.
323-
const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get());
324-
325-
impl pallet_elections_phragmen::Config for Runtime {
326-
type CandidacyBond = CandidacyBond;
327-
type ChangeMembers = Council;
328-
type Currency = Balances;
329-
type CurrencyToVote = frame_support::traits::U128CurrencyToVote;
330-
type DesiredMembers = DesiredMembers;
331-
type DesiredRunnersUp = DesiredRunnersUp;
332-
type Event = Event;
333-
type InitializeMembers = Council;
334-
type KickedMember = Treasury;
335-
type LoserCandidate = Treasury;
336-
type PalletId = PhragmenElectionPalletId;
337-
type TermDuration = TermDuration;
338-
type VotingBondBase = VotingBondBase;
339-
type VotingBondFactor = VotingBondFactor;
340-
type WeightInfo = pallet_elections_phragmen::weights::SubstrateWeight<Runtime>;
341-
}
342-
343-
parameter_types! {
344-
pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS;
310+
pub const TechnicalMotionDuration: BlockNumber = 2 * DAYS;
345311
pub const TechnicalMaxProposals: u32 = 100;
346312
pub const TechnicalMaxMembers: u32 = 100;
347313
}
@@ -390,15 +356,48 @@ impl pallet_membership::Config<pallet_membership::Instance2> for Runtime {
390356
type WeightInfo = pallet_membership::weights::SubstrateWeight<Runtime>;
391357
}
392358

359+
parameter_types! {
360+
pub const CandidacyBond: Balance = 100 * CENTS;
361+
// 1 storage item created, key size is 32 bytes, value size is 16+16.
362+
pub const VotingBondBase: Balance = deposit(1, 64);
363+
// additional data per vote is 32 bytes (account id).
364+
pub const VotingBondFactor: Balance = deposit(0, 32);
365+
/// Daily council elections
366+
pub const TermDuration: BlockNumber = 24 * HOURS;
367+
pub const DesiredMembers: u32 = 7;
368+
pub const DesiredRunnersUp: u32 = 7;
369+
pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect";
370+
}
371+
372+
// Make sure that there are no more than MaxMembers members elected via phragmen.
373+
const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get());
374+
375+
impl pallet_elections_phragmen::Config for Runtime {
376+
type CandidacyBond = CandidacyBond;
377+
type ChangeMembers = Council;
378+
type Currency = Balances;
379+
type CurrencyToVote = frame_support::traits::U128CurrencyToVote;
380+
type DesiredMembers = DesiredMembers;
381+
type DesiredRunnersUp = DesiredRunnersUp;
382+
type Event = Event;
383+
type InitializeMembers = Council;
384+
type KickedMember = Treasury;
385+
type LoserCandidate = Treasury;
386+
type PalletId = PhragmenElectionPalletId;
387+
type TermDuration = TermDuration;
388+
type VotingBondBase = VotingBondBase;
389+
type VotingBondFactor = VotingBondFactor;
390+
type WeightInfo = pallet_elections_phragmen::weights::SubstrateWeight<Runtime>;
391+
}
392+
393393
parameter_types! {
394394
pub const LaunchPeriod: BlockNumber = 7 * DAYS;
395395
pub const VotingPeriod: BlockNumber = 7 * DAYS;
396396
pub const FastTrackVotingPeriod: BlockNumber = 3 * HOURS;
397-
pub const MinimumDeposit: Balance = 50 * DOLLARS;
398-
pub const EnactmentPeriod: BlockNumber = 8 * DAYS;
397+
pub const MinimumDeposit: Balance = 100 * DOLLARS;
398+
pub const EnactmentPeriod: BlockNumber = 2 * DAYS;
399399
pub const CooloffPeriod: BlockNumber = 7 * DAYS;
400-
// One cent: $10,000 / MB
401-
pub const PreimageByteDeposit: Balance = 100 * MILLICENTS;
400+
pub const PreimageByteDeposit: Balance = 10 * MILLICENTS;
402401
pub const InstantAllowed: bool = true;
403402
pub const MaxVotes: u32 = 100;
404403
pub const MaxProposals: u32 = 100;

0 commit comments

Comments
 (0)