1234567891011121314151617use frame_support::{parameter_types, weights::Weight};18use up_common::constants::*;1920use crate::{DmpQueue, Runtime, RuntimeEvent, XcmpQueue};2122parameter_types! {23 pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);24 pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);25}2627impl cumulus_pallet_parachain_system::Config for Runtime {28 type RuntimeEvent = RuntimeEvent;29 type SelfParaId = parachain_info::Pallet<Self>;30 type OnSystemEvent = ();31 32 33 34 35 36 type OutboundXcmpMessageSource = XcmpQueue;37 type DmpMessageHandler = DmpQueue;38 type ReservedDmpWeight = ReservedDmpWeight;39 type ReservedXcmpWeight = ReservedXcmpWeight;40 type XcmpMessageHandler = XcmpQueue;41 #[cfg(not(feature = "lookahead"))]42 type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;43 #[cfg(feature = "lookahead")]44 type CheckAssociatedRelayNumber =45 cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;46 #[cfg(feature = "lookahead")]47 type ConsensusHook = ConsensusHook;48}4950impl parachain_info::Config for Runtime {}5152impl cumulus_pallet_aura_ext::Config for Runtime {}53545556#[cfg(feature = "lookahead")]57const UNINCLUDED_SEGMENT_CAPACITY: u32 = 3;585960#[cfg(feature = "lookahead")]61const BLOCK_PROCESSING_VELOCITY: u32 = 2;62#[cfg(feature = "lookahead")]63pub type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<64 Runtime,65 { MILLISECS_PER_RELAY_BLOCK as u32 },66 BLOCK_PROCESSING_VELOCITY,67 UNINCLUDED_SEGMENT_CAPACITY,68>;