From cd0793e51509e65fcbf6beaf3f14a9ef9772e63d Mon Sep 17 00:00:00 2001 From: Iulian Barbu Date: Fri, 17 Jul 2026 15:50:28 +0000 Subject: [PATCH 1/2] westend: 100-slot fast-runtime epoch for versi (westend-100 semantics) Mirrors the westend hunks of the old versi genesis hack (#8467): 10-minute sessions and proportional election phases in fast-runtime builds, so the versi V3-activation network keeps the timing of the network it replaces. --- polkadot/runtime/westend/constants/src/lib.rs | 2 +- polkadot/runtime/westend/src/lib.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/polkadot/runtime/westend/constants/src/lib.rs b/polkadot/runtime/westend/constants/src/lib.rs index df5dc57c8a5f..0a0d59d18ea4 100644 --- a/polkadot/runtime/westend/constants/src/lib.rs +++ b/polkadot/runtime/westend/constants/src/lib.rs @@ -42,7 +42,7 @@ pub mod time { pub const MILLISECS_PER_BLOCK: Moment = 6000; pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; - pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = prod_or_fast!(1 * HOURS, 1 * MINUTES); + pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = prod_or_fast!(1 * HOURS, 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/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index c90891f14930..a81601a538f8 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -348,7 +348,9 @@ impl pallet_preimage::Config for Runtime { parameter_types! { pub const EpochDuration: u64 = prod_or_fast!( EPOCH_DURATION_IN_SLOTS as u64, - 2 * MINUTES as u64 + // 100-slot (10-minute) sessions for versi, matching the historical + // westend-100 runtime the network ran before. + 10 * MINUTES as u64 ); pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; pub const ReportLongevity: u64 = @@ -571,11 +573,11 @@ parameter_types! { // phase durations. 1/4 of the last session for each. pub SignedPhase: u32 = prod_or_fast!( EPOCH_DURATION_IN_SLOTS / 4, - (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2) + (10 * MINUTES).min(EpochDuration::get().saturated_into::() / 2) ); pub UnsignedPhase: u32 = prod_or_fast!( EPOCH_DURATION_IN_SLOTS / 4, - (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2) + (10 * MINUTES).min(EpochDuration::get().saturated_into::() / 2) ); // signed config From 05b118f49eda67e046a7db3b17affa02d8cfe313 Mon Sep 17 00:00:00 2001 From: Iulian Barbu Date: Fri, 17 Jul 2026 15:50:33 +0000 Subject: [PATCH 2/2] glutton-westend, yet-another-parachain: enable V3 scheduling Wires an accept-all VerifySchedulingSignature impl (V3_SCHEDULING_ENABLED = true) into both testing runtimes, keeping their native relay parent offset 1 and velocities (3 / 12). No published runtime enables V3, so the versi V3-activation test needs these images for its V3 parachain. --- .../glutton/glutton-westend/src/lib.rs | 18 +++++++++++++++++- .../testing/yet-another-parachain/src/lib.rs | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs index bcddf5f62e35..be58656b7b22 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs @@ -188,6 +188,22 @@ const BLOCK_PROCESSING_VELOCITY: u32 = 3; /// into the relay chain. const UNINCLUDED_SEGMENT_CAPACITY: u32 = (3 + RELAY_PARENT_OFFSET) * BLOCK_PROCESSING_VELOCITY; +/// Enables V3 scheduling while accepting any scheduling signature, like the +/// `cumulus-test-runtime` `v3-descriptor` flavor does. Glutton is a testing-only +/// runtime, so signature verification adds nothing here. +pub struct SchedulingV3AcceptAll; + +impl VerifySchedulingSignature for SchedulingV3AcceptAll { + const V3_SCHEDULING_ENABLED: bool = true; + + fn verify( + _signed_info: &cumulus_primitives_core::SignedSchedulingInfo, + _internal_scheduling_parent_header: &cumulus_primitives_core::relay_chain::Header, + ) -> bool { + true + } +} + type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< Runtime, RELAY_CHAIN_SLOT_DURATION_MILLIS, @@ -208,7 +224,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; type RelayParentOffset = ConstU32; - type SchedulingSignatureVerifier = (); + type SchedulingSignatureVerifier = SchedulingV3AcceptAll; } parameter_types! { diff --git a/cumulus/parachains/runtimes/testing/yet-another-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/yet-another-parachain/src/lib.rs index f221fb62da5a..c5feacb73157 100644 --- a/cumulus/parachains/runtimes/testing/yet-another-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/yet-another-parachain/src/lib.rs @@ -153,6 +153,22 @@ const BLOCK_PROCESSING_VELOCITY: u32 = 12; /// Relay chain slot duration, in milliseconds. const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000; +/// Enables V3 scheduling while accepting any scheduling signature, like the +/// `cumulus-test-runtime` `v3-descriptor` flavor does. YAP is a testing-only +/// runtime, so signature verification adds nothing here. +pub struct SchedulingV3AcceptAll; + +impl VerifySchedulingSignature for SchedulingV3AcceptAll { + const V3_SCHEDULING_ENABLED: bool = true; + + fn verify( + _signed_info: &cumulus_primitives_core::SignedSchedulingInfo, + _internal_scheduling_parent_header: &cumulus_primitives_core::relay_chain::Header, + ) -> bool { + true + } +} + parameter_types! { pub const BlockHashCount: BlockNumber = 250; pub const Version: RuntimeVersion = VERSION; @@ -373,7 +389,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases; type ConsensusHook = ConsensusHook; type RelayParentOffset = ConstU32; - type SchedulingSignatureVerifier = (); + type SchedulingSignatureVerifier = SchedulingV3AcceptAll; } impl pallet_message_queue::Config for Runtime {