1#![cfg_attr(not(feature = "std"), no_std)]
18#![recursion_limit = "256"]
20
21#[cfg(feature = "std")]
23include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
24
25pub mod wasm_spec_version_incremented {
26 #[cfg(feature = "std")]
27 include!(concat!(env!("OUT_DIR"), "/wasm_binary_spec_version_incremented.rs"));
28}
29
30pub mod relay_parent_offset {
31 #[cfg(feature = "std")]
32 include!(concat!(env!("OUT_DIR"), "/wasm_binary_relay_parent_offset.rs"));
33}
34
35pub mod elastic_scaling_500ms {
36 #[cfg(feature = "std")]
37 include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling_500ms.rs"));
38}
39pub mod elastic_scaling_mvp {
40 #[cfg(feature = "std")]
41 include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling_mvp.rs"));
42}
43
44pub mod elastic_scaling {
45 #[cfg(feature = "std")]
46 include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling.rs"));
47}
48
49pub mod elastic_scaling_12s_slot {
50 #[cfg(feature = "std")]
51 include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling_12s_slot.rs"));
52}
53
54pub mod block_bundling {
55 #[cfg(feature = "std")]
56 include!(concat!(env!("OUT_DIR"), "/wasm_binary_block_bundling.rs"));
57}
58
59pub mod sync_backing {
60 #[cfg(feature = "std")]
61 include!(concat!(env!("OUT_DIR"), "/wasm_binary_sync_backing.rs"));
62}
63
64pub mod async_backing {
65 #[cfg(feature = "std")]
66 include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
67}
68
69pub mod slot_duration_18s {
70 #[cfg(feature = "std")]
71 include!(concat!(env!("OUT_DIR"), "/wasm_binary_slot_duration_18s.rs"));
72}
73
74mod genesis_config_presets;
75pub mod test_pallet;
76
77extern crate alloc;
78
79use alloc::{vec, vec::Vec};
80use frame_support::{derive_impl, traits::OnRuntimeUpgrade, PalletId};
81use sp_api::{decl_runtime_apis, impl_runtime_apis};
82pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
83use sp_core::{ConstBool, ConstU32, ConstU64, Get, OpaqueMetadata};
84
85use sp_runtime::{
86 generic, impl_opaque_keys,
87 traits::{BlakeTwo256, Block as BlockT, IdentifyAccount, Verify},
88 transaction_validity::{TransactionSource, TransactionValidity},
89 ApplyExtrinsicResult, MultiAddress, MultiSignature,
90};
91#[cfg(feature = "std")]
92use sp_version::NativeVersion;
93use sp_version::RuntimeVersion;
94
95use cumulus_primitives_core::{ParaId, RelayProofRequest};
96
97pub use frame_support::{
99 construct_runtime,
100 dispatch::DispatchClass,
101 genesis_builder_helper::{build_state, get_preset},
102 parameter_types,
103 traits::{ConstU8, Randomness},
104 weights::{
105 constants::{
106 BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND,
107 },
108 ConstantMultiplier, IdentityFee, Weight,
109 },
110 StorageValue,
111};
112pub use frame_system::Call as SystemCall;
113use frame_system::{
114 limits::{BlockLength, BlockWeights},
115 EnsureRoot,
116};
117pub use pallet_balances::Call as BalancesCall;
118pub use pallet_glutton::Call as GluttonCall;
119pub use pallet_sudo::Call as SudoCall;
120pub use pallet_timestamp::{Call as TimestampCall, Now};
121#[cfg(any(feature = "std", test))]
122pub use sp_runtime::BuildStorage;
123pub use sp_runtime::{Perbill, Permill};
124pub use test_pallet::{Call as TestPalletCall, TestTransactionExtension};
125
126pub type SessionHandlers = ();
127
128impl_opaque_keys! {
129 pub struct SessionKeys {
130 pub aura: Aura,
131 }
132}
133
134pub const PARACHAIN_ID: u32 = 100;
136
137#[cfg(any(feature = "elastic-scaling-500ms", feature = "block-bundling"))]
138pub const BLOCK_PROCESSING_VELOCITY: u32 = 12;
139
140#[cfg(all(feature = "elastic-scaling-multi-block-slot", not(feature = "elastic-scaling-500ms")))]
141pub const BLOCK_PROCESSING_VELOCITY: u32 = 6;
142
143#[cfg(all(
144 any(feature = "elastic-scaling", feature = "relay-parent-offset"),
145 not(feature = "elastic-scaling-500ms"),
146 not(feature = "elastic-scaling-multi-block-slot")
147))]
148pub const BLOCK_PROCESSING_VELOCITY: u32 = 3;
149
150#[cfg(not(any(
151 feature = "elastic-scaling",
152 feature = "elastic-scaling-500ms",
153 feature = "elastic-scaling-multi-block-slot",
154 feature = "relay-parent-offset",
155 feature = "block-bundling",
156)))]
157pub const BLOCK_PROCESSING_VELOCITY: u32 = 1;
158
159#[cfg(feature = "async-backing")]
160const UNINCLUDED_SEGMENT_CAPACITY: u32 = 3;
161
162#[cfg(all(feature = "sync-backing", not(feature = "async-backing")))]
163const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;
164
165#[cfg(all(not(feature = "sync-backing"), not(feature = "async-backing")))]
176const UNINCLUDED_SEGMENT_CAPACITY: u32 = BLOCK_PROCESSING_VELOCITY * (3 + RELAY_PARENT_OFFSET);
177
178#[cfg(feature = "slot-duration-18s")]
179pub const SLOT_DURATION: u64 = 18000;
180#[cfg(all(
181 any(feature = "sync-backing", feature = "elastic-scaling-12s-slot"),
182 not(feature = "slot-duration-18s")
183))]
184pub const SLOT_DURATION: u64 = 12000;
185#[cfg(not(any(
186 feature = "sync-backing",
187 feature = "elastic-scaling-12s-slot",
188 feature = "slot-duration-18s"
189)))]
190pub const SLOT_DURATION: u64 = 6000;
191
192const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
193
194#[cfg(all(not(feature = "increment-spec-version"), not(feature = "elastic-scaling")))]
206#[sp_version::runtime_version]
207pub const VERSION: RuntimeVersion = RuntimeVersion {
208 spec_name: alloc::borrow::Cow::Borrowed("cumulus-test-parachain"),
209 impl_name: alloc::borrow::Cow::Borrowed("cumulus-test-parachain"),
210 authoring_version: 1,
211 spec_version: 2,
213 impl_version: 1,
214 apis: RUNTIME_API_VERSIONS,
215 transaction_version: 1,
216 system_version: 3,
217};
218
219#[cfg(any(feature = "increment-spec-version", feature = "elastic-scaling"))]
220#[sp_version::runtime_version]
221pub const VERSION: RuntimeVersion = RuntimeVersion {
222 spec_name: alloc::borrow::Cow::Borrowed("cumulus-test-parachain"),
223 impl_name: alloc::borrow::Cow::Borrowed("cumulus-test-parachain"),
224 authoring_version: 1,
225 spec_version: 3,
227 impl_version: 1,
228 apis: RUNTIME_API_VERSIONS,
229 transaction_version: 1,
230 system_version: 3,
231};
232
233pub const EPOCH_DURATION_IN_BLOCKS: u32 = 10 * MINUTES;
234
235pub const MINUTES: BlockNumber = 60_000 / (SLOT_DURATION as BlockNumber);
237pub const HOURS: BlockNumber = MINUTES * 60;
238pub const DAYS: BlockNumber = HOURS * 24;
239
240pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4);
242
243#[cfg(feature = "std")]
245pub fn native_version() -> NativeVersion {
246 NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
247}
248
249const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
252const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
255
256type MaximumBlockWeight = cumulus_pallet_parachain_system::block_weight::MaxParachainBlockWeight<
257 Runtime,
258 ConstU32<BLOCK_PROCESSING_VELOCITY>,
259>;
260
261parameter_types! {
262 pub const NumberOfBlocksPerRelaySlot: u32 = 12;
264 pub const BlockHashCount: BlockNumber = 250;
265 pub const Version: RuntimeVersion = VERSION;
266 pub RuntimeBlockLength: BlockLength =
268 BlockLength::builder().max_length(10 * 1024 * 1024).max_header_size(5 * 1024 * 1024).build();
269 pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()
270 .base_block(BlockExecutionWeight::get())
271 .for_class(DispatchClass::all(), |weights| {
272 weights.base_extrinsic = ExtrinsicBaseWeight::get();
273 })
274 .for_class(DispatchClass::Normal, |weights| {
275 weights.max_total = Some(NORMAL_DISPATCH_RATIO * MaximumBlockWeight::get());
276 })
277 .for_class(DispatchClass::Operational, |weights| {
278 weights.max_total = Some(MaximumBlockWeight::get());
279 weights.reserved = Some(
282 MaximumBlockWeight::get() - NORMAL_DISPATCH_RATIO * MaximumBlockWeight::get()
283 );
284 })
285 .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)
286 .build_or_panic();
287 pub const SS58Prefix: u8 = 42;
288}
289
290#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
291impl frame_system::Config for Runtime {
292 type AccountId = AccountId;
294 type Nonce = Nonce;
296 type Hash = Hash;
298 type Block = Block;
300 type BlockHashCount = BlockHashCount;
302 type Version = Version;
304 type AccountData = pallet_balances::AccountData<Balance>;
305 type BlockWeights = RuntimeBlockWeights;
306 type BlockLength = RuntimeBlockLength;
307 type SS58Prefix = SS58Prefix;
308 type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
309 type MaxConsumers = frame_support::traits::ConstU32<16>;
310 type PreInherents = cumulus_pallet_parachain_system::block_weight::DynamicMaxBlockWeightHooks<
311 Runtime,
312 ConstU32<BLOCK_PROCESSING_VELOCITY>,
313 >;
314 type SingleBlockMigrations = SingleBlockMigrations;
315}
316
317impl cumulus_pallet_weight_reclaim::Config for Runtime {
318 type WeightInfo = ();
319}
320
321parameter_types! {
322 pub const MinimumPeriod: u64 = 0;
323}
324
325parameter_types! {
326 pub const PotId: PalletId = PalletId(*b"PotStake");
327 pub const SessionLength: BlockNumber = 10 * MINUTES;
328 pub const Offset: u32 = 0;
329}
330
331impl cumulus_pallet_aura_ext::Config for Runtime {}
332
333impl pallet_timestamp::Config for Runtime {
334 type Moment = u64;
336 type OnTimestampSet = Aura;
337 type MinimumPeriod = MinimumPeriod;
338 type WeightInfo = ();
339}
340
341parameter_types! {
342 pub const ExistentialDeposit: u128 = 500;
343 pub const TransferFee: u128 = 0;
344 pub const CreationFee: u128 = 0;
345 pub const TransactionByteFee: u128 = 1;
346 pub const MaxReserves: u32 = 50;
347}
348
349impl pallet_balances::Config for Runtime {
350 type Balance = Balance;
352 type RuntimeEvent = RuntimeEvent;
354 type DustRemoval = ();
355 type ExistentialDeposit = ExistentialDeposit;
356 type AccountStore = System;
357 type WeightInfo = ();
358 type MaxLocks = ();
359 type MaxReserves = MaxReserves;
360 type ReserveIdentifier = [u8; 8];
361 type RuntimeHoldReason = RuntimeHoldReason;
362 type RuntimeFreezeReason = RuntimeFreezeReason;
363 type FreezeIdentifier = ();
364 type MaxFreezes = ConstU32<0>;
365 type DoneSlashHandler = ();
366}
367
368impl pallet_transaction_payment::Config for Runtime {
369 type RuntimeEvent = RuntimeEvent;
370 type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter<Balances, ()>;
371 type WeightToFee = IdentityFee<Balance>;
372 type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
373 type FeeMultiplierUpdate = ();
374 type OperationalFeeMultiplier = ConstU8<5>;
375 type WeightInfo = pallet_transaction_payment::weights::SubstrateWeight<Runtime>;
376}
377
378impl pallet_sudo::Config for Runtime {
379 type RuntimeCall = RuntimeCall;
380 type RuntimeEvent = RuntimeEvent;
381 type WeightInfo = pallet_sudo::weights::SubstrateWeight<Runtime>;
382}
383
384impl pallet_utility::Config for Runtime {
385 type RuntimeCall = RuntimeCall;
386 type RuntimeEvent = RuntimeEvent;
387 type PalletsOrigin = OriginCaller;
388 type WeightInfo = pallet_utility::weights::SubstrateWeight<Runtime>;
389}
390
391impl pallet_glutton::Config for Runtime {
392 type RuntimeEvent = RuntimeEvent;
393 type AdminOrigin = EnsureRoot<AccountId>;
394 type WeightInfo = pallet_glutton::weights::SubstrateWeight<Runtime>;
395}
396
397#[cfg(feature = "relay-parent-offset")]
398const RELAY_PARENT_OFFSET: u32 = 2;
399
400#[cfg(not(feature = "relay-parent-offset"))]
401const RELAY_PARENT_OFFSET: u32 = 0;
402
403type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<
404 Runtime,
405 RELAY_CHAIN_SLOT_DURATION_MILLIS,
406 BLOCK_PROCESSING_VELOCITY,
407 UNINCLUDED_SEGMENT_CAPACITY,
408>;
409impl cumulus_pallet_parachain_system::Config for Runtime {
410 type WeightInfo = ();
411 type SelfParaId = parachain_info::Pallet<Runtime>;
412 type RuntimeEvent = RuntimeEvent;
413 type OnSystemEvent = TestPallet;
414 type OutboundXcmpMessageSource = TestPallet;
415 type DmpQueue = frame_support::traits::EnqueueWithOrigin<(), sp_core::ConstU8<0>>;
417 type ReservedDmpWeight = ();
418 type XcmpMessageHandler = ();
419 type ReservedXcmpWeight = ();
420 type CheckAssociatedRelayNumber =
421 cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;
422 type ConsensusHook = ConsensusHook;
423 type RelayParentOffset = ConstU32<RELAY_PARENT_OFFSET>;
424}
425
426impl parachain_info::Config for Runtime {}
427
428impl pallet_aura::Config for Runtime {
429 type AuthorityId = AuraId;
430 type DisabledValidators = ();
431 type MaxAuthorities = ConstU32<32>;
432 #[cfg(feature = "sync-backing")]
433 type AllowMultipleBlocksPerSlot = ConstBool<false>;
434 #[cfg(not(feature = "sync-backing"))]
435 type AllowMultipleBlocksPerSlot = ConstBool<true>;
436 type SlotDuration = ConstU64<SLOT_DURATION>;
437}
438
439impl test_pallet::Config for Runtime {}
440
441construct_runtime! {
442 pub enum Runtime
443 {
444 System: frame_system,
445 ParachainSystem: cumulus_pallet_parachain_system,
446 Timestamp: pallet_timestamp,
447 ParachainInfo: parachain_info,
448 Balances: pallet_balances,
449 Sudo: pallet_sudo,
450 Utility: pallet_utility,
451 TransactionPayment: pallet_transaction_payment,
452 TestPallet: test_pallet,
453 Glutton: pallet_glutton,
454 Aura: pallet_aura,
455 AuraExt: cumulus_pallet_aura_ext,
456 WeightReclaim: cumulus_pallet_weight_reclaim,
457 }
458}
459
460pub type Nonce = u32;
462pub type Hash = sp_core::H256;
464pub type Balance = u128;
466pub type Signature = MultiSignature;
468pub type BlockNumber = u32;
470pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;
473pub type NodeBlock = generic::Block<Header, sp_runtime::OpaqueExtrinsic>;
475
476pub type Address = MultiAddress<AccountId, ()>;
478pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
480pub type Block = generic::Block<Header, UncheckedExtrinsic>;
482pub type SignedBlock = generic::SignedBlock<Block>;
484pub type BlockId = generic::BlockId<Block>;
486pub type TxExtension = cumulus_pallet_parachain_system::block_weight::DynamicMaxBlockWeight<
488 Runtime,
489 cumulus_pallet_weight_reclaim::StorageWeightReclaim<
490 Runtime,
491 (
492 frame_system::AuthorizeCall<Runtime>,
493 frame_system::CheckNonZeroSender<Runtime>,
494 frame_system::CheckSpecVersion<Runtime>,
495 frame_system::CheckGenesis<Runtime>,
496 frame_system::CheckEra<Runtime>,
497 frame_system::CheckNonce<Runtime>,
498 frame_system::CheckWeight<Runtime>,
499 pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
500 test_pallet::TestTransactionExtension<Runtime>,
501 ),
502 >,
503 ConstU32<BLOCK_PROCESSING_VELOCITY>,
504>;
505
506pub type UncheckedExtrinsic =
508 generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, TxExtension>;
509pub type Executive = frame_executive::Executive<
511 Runtime,
512 Block,
513 frame_system::ChainContext<Runtime>,
514 Runtime,
515 AllPalletsWithSystem,
516>;
517
518pub type SignedPayload = generic::SignedPayload<RuntimeCall, TxExtension>;
520
521pub struct VerifyRuntimeUpgrade;
525
526impl OnRuntimeUpgrade for VerifyRuntimeUpgrade {
527 fn on_runtime_upgrade() -> Weight {
528 assert_eq!(
529 sp_io::storage::get(test_pallet::TEST_RUNTIME_UPGRADE_KEY),
530 Some(vec![1, 2, 3, 4].into())
531 );
532 Weight::from_parts(1, 0)
533 }
534}
535
536pub type SingleBlockMigrations = (
541 VerifyRuntimeUpgrade,
543);
544
545decl_runtime_apis! {
546 pub trait GetLastTimestamp {
547 fn get_last_timestamp() -> u64;
549 }
550}
551
552impl_runtime_apis! {
553 impl sp_api::Core<Block> for Runtime {
554 fn version() -> RuntimeVersion {
555 VERSION
556 }
557
558 fn execute_block(block: <Block as BlockT>::LazyBlock) {
559 Executive::execute_block(block)
560 }
561
562 fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
563 Executive::initialize_block(header)
564 }
565 }
566
567
568 impl cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> for Runtime {
569 fn can_build_upon(
570 included_hash: <Block as BlockT>::Hash,
571 slot: cumulus_primitives_aura::Slot,
572 ) -> bool {
573 ConsensusHook::can_build_upon(included_hash, slot)
574 }
575 }
576
577 impl cumulus_primitives_core::RelayParentOffsetApi<Block> for Runtime {
578 fn relay_parent_offset() -> u32 {
579 RELAY_PARENT_OFFSET
580 }
581 }
582
583 impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
584 fn slot_duration() -> sp_consensus_aura::SlotDuration {
585 sp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION)
586 }
587
588 fn authorities() -> Vec<AuraId> {
589 pallet_aura::Authorities::<Runtime>::get().into_inner()
590 }
591 }
592
593 impl sp_api::Metadata<Block> for Runtime {
594 fn metadata() -> OpaqueMetadata {
595 OpaqueMetadata::new(Runtime::metadata().into())
596 }
597
598 fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {
599 Runtime::metadata_at_version(version)
600 }
601
602 fn metadata_versions() -> Vec<u32> {
603 Runtime::metadata_versions()
604 }
605 }
606
607 impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
608 fn account_nonce(account: AccountId) -> Nonce {
609 System::account_nonce(account)
610 }
611 }
612
613 impl sp_block_builder::BlockBuilder<Block> for Runtime {
614 fn apply_extrinsic(
615 extrinsic: <Block as BlockT>::Extrinsic,
616 ) -> ApplyExtrinsicResult {
617 Executive::apply_extrinsic(extrinsic)
618 }
619
620 fn finalize_block() -> <Block as BlockT>::Header {
621 Executive::finalize_block()
622 }
623
624 fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
625 data.create_extrinsics()
626 }
627
628 fn check_inherents(block: <Block as BlockT>::LazyBlock, data: sp_inherents::InherentData) -> sp_inherents::CheckInherentsResult {
629 data.check_extrinsics(&block)
630 }
631
632 }
633
634 impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
635 fn validate_transaction(
636 source: TransactionSource,
637 tx: <Block as BlockT>::Extrinsic,
638 block_hash: <Block as BlockT>::Hash,
639 ) -> TransactionValidity {
640 Executive::validate_transaction(source, tx, block_hash)
641 }
642 }
643
644 impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
645 fn offchain_worker(header: &<Block as BlockT>::Header) {
646 Executive::offchain_worker(header)
647 }
648 }
649
650 impl sp_session::SessionKeys<Block> for Runtime {
651 fn decode_session_keys(
652 encoded: Vec<u8>,
653 ) -> Option<Vec<(Vec<u8>, sp_core::crypto::KeyTypeId)>> {
654 SessionKeys::decode_into_raw_public_keys(&encoded)
655 }
656
657 fn generate_session_keys(owner: Vec<u8>, seed: Option<Vec<u8>>) -> sp_session::OpaqueGeneratedSessionKeys {
658 SessionKeys::generate(&owner, seed).into()
659 }
660 }
661
662 impl crate::GetLastTimestamp<Block> for Runtime {
663 fn get_last_timestamp() -> u64 {
664 Now::<Runtime>::get()
665 }
666 }
667
668 impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
669 fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
670 ParachainSystem::collect_collation_info(header)
671 }
672 }
673
674 impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
675 fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
676 build_state::<RuntimeGenesisConfig>(config)
677 }
678
679 fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
680 get_preset::<RuntimeGenesisConfig>(id, genesis_config_presets::get_preset)
681 }
682
683 fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
684 genesis_config_presets::preset_names()
685 }
686 }
687
688 impl cumulus_primitives_core::GetParachainInfo<Block> for Runtime {
689 fn parachain_id() -> ParaId {
690 ParachainInfo::parachain_id()
691 }
692 }
693
694 #[cfg(any(not(feature = "elastic-scaling"), feature = "std"))]
696 impl cumulus_primitives_core::TargetBlockRate<Block> for Runtime {
697 fn target_block_rate() -> u32 {
698 BLOCK_PROCESSING_VELOCITY
699 }
700 }
701
702 impl cumulus_primitives_core::KeyToIncludeInRelayProof<Block> for Runtime {
703 fn keys_to_prove() -> cumulus_primitives_core::RelayProofRequest {
704 use cumulus_primitives_core::RelayStorageKey;
705 RelayProofRequest {
706 keys: vec![
707 RelayStorageKey::Top(test_pallet::relay_alice_account_key()),
709 ],
710 }
711 }
712 }
713}
714
715cumulus_pallet_parachain_system::register_validate_block! {
716 Runtime = Runtime,
717 BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,
718}