diff --git a/polkadot/runtime/kusama/src/constants.rs b/polkadot/runtime/kusama/src/constants.rs index 6b60cb1c9aab6fe988d8020551c01552ffd9ff0d..13efedea0bed407baecad3d4f621e68398077274 100644 --- a/polkadot/runtime/kusama/src/constants.rs +++ b/polkadot/runtime/kusama/src/constants.rs @@ -37,11 +37,11 @@ pub mod time { // pub const MILLISECS_PER_BLOCK: Moment = 1000; pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; // Kusama - pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 1 * HOURS; + pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = 1 * HOURS; // Mainnet -// pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 4 * HOURS; +// pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = 4 * HOURS; // Testnet -// pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 10 * MINUTES; +// pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = 10 * MINUTES; // These time units are defined in number of blocks. pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs index a31683d81d4826b2998624ddc0cebf19bd254e5d..a931677000f01d335738324fc421bd268f7e8182 100644 --- a/polkadot/runtime/kusama/src/lib.rs +++ b/polkadot/runtime/kusama/src/lib.rs @@ -180,7 +180,7 @@ impl pallet_scheduler::Config for Runtime { } parameter_types! { - pub const EpochDuration: u64 = EPOCH_DURATION_IN_BLOCKS as u64; + pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64; pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; pub const ReportLongevity: u64 = BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); @@ -311,7 +311,7 @@ impl pallet_session::historical::Config for Runtime { parameter_types! { // no signed phase for now, just unsigned. pub const SignedPhase: u32 = 0; - pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_BLOCKS / 4; + pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; // fallback: run election on-chain. pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy = diff --git a/polkadot/runtime/polkadot/src/constants.rs b/polkadot/runtime/polkadot/src/constants.rs index 6b72b7e921001e84a5db8cbd3e1836de0d22bbc0..27a674fe9b4f1e9f54c631b87ad0c7746ba3fdd7 100644 --- a/polkadot/runtime/polkadot/src/constants.rs +++ b/polkadot/runtime/polkadot/src/constants.rs @@ -33,7 +33,7 @@ pub mod time { use primitives::v0::{Moment, BlockNumber}; pub const MILLISECS_PER_BLOCK: Moment = 6000; pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; - pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 4 * HOURS; + pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = 4 * HOURS; // These time units are defined in number of blocks. pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index e2967b77898d263fee6f4ee17b2307360c22fe8e..5b0665e9bf428fc453465b18581fd437f1520070 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -194,7 +194,7 @@ impl pallet_scheduler::Config for Runtime { } parameter_types! { - pub const EpochDuration: u64 = EPOCH_DURATION_IN_BLOCKS as u64; + pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64; pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; pub const ReportLongevity: u64 = BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); @@ -321,7 +321,7 @@ impl pallet_session::historical::Config for Runtime { parameter_types! { // no signed phase for now, just unsigned. pub const SignedPhase: u32 = 0; - pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_BLOCKS / 4; + pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; // fallback: run election on-chain. pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy = diff --git a/polkadot/runtime/test-runtime/src/constants.rs b/polkadot/runtime/test-runtime/src/constants.rs index 0d9a4fa088e3aa16d6d8b744c8ede8aa5f9f983a..658a4bdca7a0115dd2df253f81f533063ff883e5 100644 --- a/polkadot/runtime/test-runtime/src/constants.rs +++ b/polkadot/runtime/test-runtime/src/constants.rs @@ -31,7 +31,7 @@ pub mod time { pub const MILLISECS_PER_BLOCK: Moment = 6000; pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; // 30 seconds for now - pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = MINUTES / 2; + pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = MINUTES / 2; // These time units are defined in number of blocks. pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); diff --git a/polkadot/runtime/test-runtime/src/lib.rs b/polkadot/runtime/test-runtime/src/lib.rs index fd5253fe21fd6555e33396d324d70a95aac4f130..2a0cc386af548ce7ca63c0a5f3ef26abdd65160d 100644 --- a/polkadot/runtime/test-runtime/src/lib.rs +++ b/polkadot/runtime/test-runtime/src/lib.rs @@ -162,7 +162,7 @@ impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime where } parameter_types! { - pub storage EpochDuration: u64 = EPOCH_DURATION_IN_BLOCKS as u64; + pub storage EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64; pub storage ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; } diff --git a/polkadot/runtime/westend/src/constants.rs b/polkadot/runtime/westend/src/constants.rs index b897299ed45e3c8d1cd0f05326e754c40825df67..08eaa8dcb453d32367838c275a81b093d8c22043 100644 --- a/polkadot/runtime/westend/src/constants.rs +++ b/polkadot/runtime/westend/src/constants.rs @@ -33,7 +33,7 @@ pub mod time { use primitives::v0::{Moment, BlockNumber}; pub const MILLISECS_PER_BLOCK: Moment = 6000; pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; - pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 1 * HOURS; + pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = 1 * HOURS; // These time units are defined in number of blocks. pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index a272abe0508e4b7f156282a135470031d617c3da..18f605fdf31cfd73cccfdac5ef5935ad6a01c32c 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -172,7 +172,7 @@ impl pallet_scheduler::Config for Runtime { } parameter_types! { - pub const EpochDuration: u64 = EPOCH_DURATION_IN_BLOCKS as u64; + pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64; pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; pub const ReportLongevity: u64 = BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); @@ -337,7 +337,7 @@ impl pallet_session::historical::Config for Runtime { parameter_types! { // no signed phase for now, just unsigned. pub const SignedPhase: u32 = 0; - pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_BLOCKS / 4; + pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; // fallback: run election on-chain. pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy =