From bbeffd77985830721603eed914910f7abee8879e Mon Sep 17 00:00:00 2001 From: Maksim Ramanenkau Date: Mon, 4 Mar 2024 13:09:33 +0100 Subject: [PATCH] Set short timings --- runtime/cere-dev/constants/src/lib.rs | 2 +- runtime/cere-dev/src/lib.rs | 26 ++++++++++++------------- runtime/cere/constants/src/lib.rs | 2 +- runtime/cere/src/lib.rs | 28 +++++++++++++-------------- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/runtime/cere-dev/constants/src/lib.rs b/runtime/cere-dev/constants/src/lib.rs index 6da8a04ea..7e9cc04e1 100644 --- a/runtime/cere-dev/constants/src/lib.rs +++ b/runtime/cere-dev/constants/src/lib.rs @@ -63,7 +63,7 @@ pub mod time { // 1 in 4 blocks (on average, not counting collisions) will be primary BABE blocks. pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); - pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 4 * HOURS; + pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 3 * MINUTES; pub const EPOCH_DURATION_IN_SLOTS: u64 = { const SLOT_FILL_RATE: f64 = MILLISECS_PER_BLOCK as f64 / SLOT_DURATION as f64; diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 439fcadb3..1c7386b0c 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -503,7 +503,7 @@ pallet_staking_reward_curve::build! { } parameter_types! { - pub const SessionsPerEra: sp_staking::SessionIndex = 6; + pub const SessionsPerEra: sp_staking::SessionIndex = 2; pub const BondingDuration: sp_staking::EraIndex = 3; pub const SlashDeferDuration: sp_staking::EraIndex = 2; pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; @@ -723,12 +723,12 @@ impl pallet_bags_list::Config for Runtime { } parameter_types! { - pub const LaunchPeriod: BlockNumber = 1 * 24 * 60 * MINUTES; - pub const VotingPeriod: BlockNumber = 1 * 24 * 60 * MINUTES; - pub const FastTrackVotingPeriod: BlockNumber = 3 * 60 * MINUTES; - pub const MinimumDeposit: Balance = 5000 * DOLLARS; - pub const EnactmentPeriod: BlockNumber = 1 * 24 * 60 * MINUTES; - pub const CooloffPeriod: BlockNumber = 7 * 24 * 60 * MINUTES; + pub const LaunchPeriod: BlockNumber = 3 * MINUTES; + pub const VotingPeriod: BlockNumber = 3 * MINUTES; + pub const FastTrackVotingPeriod: BlockNumber = 3 * MINUTES; + pub const MinimumDeposit: Balance = 10 * DOLLARS; + pub const EnactmentPeriod: BlockNumber = 3 * MINUTES; + pub const CooloffPeriod: BlockNumber = 3 * MINUTES; pub const MaxProposals: u32 = 100; } @@ -784,7 +784,7 @@ impl pallet_democracy::Config for Runtime { } parameter_types! { - pub const CouncilMotionDuration: BlockNumber = 7 * DAYS; + pub const CouncilMotionDuration: BlockNumber = 3 * MINUTES; pub const CouncilMaxProposals: u32 = 100; pub const CouncilMaxMembers: u32 = 100; } @@ -806,7 +806,7 @@ parameter_types! { // 1 storage item created, key size is 32 bytes, value size is 16+16. pub const VotingBondBase: Balance = deposit(1, 64); pub const VotingBondFactor: Balance = 1 * DOLLARS; - pub const TermDuration: BlockNumber = 7 * DAYS; + pub const TermDuration: BlockNumber = 5 * MINUTES; pub const DesiredMembers: u32 = 13; pub const DesiredRunnersUp: u32 = 20; pub const ElectionsPhragmenPalletId: LockIdentifier = *b"phrelect"; @@ -877,9 +877,9 @@ impl pallet_membership::Config for Runtime { parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 100 * DOLLARS; - pub const SpendPeriod: BlockNumber = 1 * DAYS; + pub const SpendPeriod: BlockNumber = 3 * MINUTES; pub const Burn: Permill = Permill::from_percent(0); - pub const TipCountdown: BlockNumber = 1 * DAYS; + pub const TipCountdown: BlockNumber = 3 * MINUTES; pub const TipFindersFee: Percent = Percent::from_percent(20); pub const TipReportDepositBase: Balance = 1 * DOLLARS; pub const DataDepositPerByte: Balance = 1 * CENTS; @@ -1165,10 +1165,10 @@ parameter_types! { pub const CandidateDeposit: Balance = 10 * DOLLARS; pub const WrongSideDeduction: Balance = 2 * DOLLARS; pub const MaxStrikes: u32 = 10; - pub const RotationPeriod: BlockNumber = 80 * HOURS; + pub const RotationPeriod: BlockNumber = 3 * MINUTES; pub const PeriodSpend: Balance = 500 * DOLLARS; pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS; - pub const ChallengePeriod: BlockNumber = 7 * DAYS; + pub const ChallengePeriod: BlockNumber = 3 * MINUTES; pub const MaxCandidateIntake: u32 = 10; pub const SocietyPalletId: PalletId = PalletId(*b"py/socie"); } diff --git a/runtime/cere/constants/src/lib.rs b/runtime/cere/constants/src/lib.rs index 6da8a04ea..7e9cc04e1 100644 --- a/runtime/cere/constants/src/lib.rs +++ b/runtime/cere/constants/src/lib.rs @@ -63,7 +63,7 @@ pub mod time { // 1 in 4 blocks (on average, not counting collisions) will be primary BABE blocks. pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); - pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 4 * HOURS; + pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 3 * MINUTES; pub const EPOCH_DURATION_IN_SLOTS: u64 = { const SLOT_FILL_RATE: f64 = MILLISECS_PER_BLOCK as f64 / SLOT_DURATION as f64; diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index 33150f46f..604b3aad1 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -501,7 +501,7 @@ pallet_staking_reward_curve::build! { } parameter_types! { - pub const SessionsPerEra: sp_staking::SessionIndex = 6; + pub const SessionsPerEra: sp_staking::SessionIndex = 2; pub const BondingDuration: sp_staking::EraIndex = 3; pub const SlashDeferDuration: sp_staking::EraIndex = 2; pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; @@ -722,12 +722,12 @@ impl pallet_bags_list::Config for Runtime { } parameter_types! { - pub const LaunchPeriod: BlockNumber = 1 * 24 * 60 * MINUTES; - pub const VotingPeriod: BlockNumber = 1 * 24 * 60 * MINUTES; - pub const FastTrackVotingPeriod: BlockNumber = 3 * 60 * MINUTES; - pub const MinimumDeposit: Balance = 5000 * DOLLARS; - pub const EnactmentPeriod: BlockNumber = 1 * 24 * 60 * MINUTES; - pub const CooloffPeriod: BlockNumber = 7 * 24 * 60 * MINUTES; + pub const LaunchPeriod: BlockNumber = 3 * MINUTES; + pub const VotingPeriod: BlockNumber = 3 * MINUTES; + pub const FastTrackVotingPeriod: BlockNumber = 3 * MINUTES; + pub const MinimumDeposit: Balance = 10 * DOLLARS; + pub const EnactmentPeriod: BlockNumber = 3 * MINUTES; + pub const CooloffPeriod: BlockNumber = 3 * MINUTES; pub const MaxProposals: u32 = 100; } @@ -783,7 +783,7 @@ impl pallet_democracy::Config for Runtime { } parameter_types! { - pub const CouncilMotionDuration: BlockNumber = 7 * DAYS; + pub const CouncilMotionDuration: BlockNumber = 3 * MINUTES; pub const CouncilMaxProposals: u32 = 100; pub const CouncilMaxMembers: u32 = 100; } @@ -805,7 +805,7 @@ parameter_types! { // 1 storage item created, key size is 32 bytes, value size is 16+16. pub const VotingBondBase: Balance = deposit(1, 64); pub const VotingBondFactor: Balance = 1 * DOLLARS; - pub const TermDuration: BlockNumber = 7 * DAYS; + pub const TermDuration: BlockNumber = 3 * MINUTES; pub const DesiredMembers: u32 = 13; pub const DesiredRunnersUp: u32 = 20; pub const ElectionsPhragmenPalletId: LockIdentifier = *b"phrelect"; @@ -839,7 +839,7 @@ impl pallet_elections_phragmen::Config for Runtime { } parameter_types! { - pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS; + pub const TechnicalMotionDuration: BlockNumber = 3 * MINUTES; pub const TechnicalMaxProposals: u32 = 100; pub const TechnicalMaxMembers: u32 = 100; } @@ -876,9 +876,9 @@ impl pallet_membership::Config for Runtime { parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 100 * DOLLARS; - pub const SpendPeriod: BlockNumber = 1 * DAYS; + pub const SpendPeriod: BlockNumber = 3 * MINUTES; pub const Burn: Permill = Permill::from_percent(0); - pub const TipCountdown: BlockNumber = 1 * DAYS; + pub const TipCountdown: BlockNumber = 3 * MINUTES; pub const TipFindersFee: Percent = Percent::from_percent(20); pub const TipReportDepositBase: Balance = 1 * DOLLARS; pub const DataDepositPerByte: Balance = 1 * CENTS; @@ -1164,10 +1164,10 @@ parameter_types! { pub const CandidateDeposit: Balance = 10 * DOLLARS; pub const WrongSideDeduction: Balance = 2 * DOLLARS; pub const MaxStrikes: u32 = 10; - pub const RotationPeriod: BlockNumber = 80 * HOURS; + pub const RotationPeriod: BlockNumber = 3 * MINUTES; pub const PeriodSpend: Balance = 500 * DOLLARS; pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS; - pub const ChallengePeriod: BlockNumber = 7 * DAYS; + pub const ChallengePeriod: BlockNumber = 9 * MINUTES; pub const MaxCandidateIntake: u32 = 10; pub const SocietyPalletId: PalletId = PalletId(*b"py/socie"); }