pezkuwi_sdk_docs/pezkuwi_sdk/
pezcumulus.rs1#![doc = docify::embed!("./src/pezkuwi_sdk/pezcumulus.rs", system_pallets)]
24#![doc = docify::embed!("./src/pezkuwi_sdk/pezcumulus.rs", consensus_pallets)]
32#![doc = docify::embed!("./src/pezkuwi_sdk/pezcumulus.rs", validate_block)]
40#![deny(rustdoc::broken_intra_doc_links)]
46#![deny(rustdoc::private_intra_doc_links)]
47
48#[cfg(test)]
49mod tests {
50 mod runtime {
51 pub use pezframe::{
52 deps::pezsp_consensus_aura::sr25519::AuthorityId as AuraId, prelude::*,
53 runtime::prelude::*, testing_prelude::*,
54 };
55
56 #[docify::export(CR)]
57 construct_runtime!(
58 pub enum Runtime {
59 System: pezframe_system,
61 Timestamp: pezpallet_timestamp,
62 TeyrchainSystem: pezcumulus_pezpallet_teyrchain_system,
63 TeyrchainInfo: teyrchain_info,
64
65 Aura: pezpallet_aura,
67 AuraExt: pezcumulus_pezpallet_aura_ext,
68 }
69 );
70
71 #[docify::export]
72 mod system_pallets {
73 use super::*;
74
75 #[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
76 impl pezframe_system::Config for Runtime {
77 type Block = MockBlock<Self>;
78 type OnSetCode = pezcumulus_pezpallet_teyrchain_system::TeyrchainSetCode<Self>;
79 }
80
81 impl pezcumulus_pezpallet_teyrchain_system::Config for Runtime {
82 type RuntimeEvent = RuntimeEvent;
83 type OnSystemEvent = ();
84 type SelfParaId = teyrchain_info::Pezpallet<Runtime>;
85 type OutboundXcmpMessageSource = ();
86 type XcmpMessageHandler = ();
87 type ReservedDmpWeight = ();
88 type ReservedXcmpWeight = ();
89 type CheckAssociatedRelayNumber =
90 pezcumulus_pezpallet_teyrchain_system::RelayNumberMonotonicallyIncreases;
91 type ConsensusHook = pezcumulus_pezpallet_aura_ext::FixedVelocityConsensusHook<
92 Runtime,
93 6000, 1,
95 1,
96 >;
97 type WeightInfo = ();
98 type DmpQueue = pezframe::traits::EnqueueWithOrigin<(), pezsp_core::ConstU8<0>>;
99 type RelayParentOffset = ConstU32<0>;
100 }
101
102 impl teyrchain_info::Config for Runtime {}
103 }
104
105 #[docify::export]
106 mod consensus_pallets {
107 use super::*;
108
109 impl pezpallet_aura::Config for Runtime {
110 type AuthorityId = AuraId;
111 type DisabledValidators = ();
112 type MaxAuthorities = ConstU32<100_000>;
113 type AllowMultipleBlocksPerSlot = ConstBool<false>;
114 type SlotDuration = pezpallet_aura::MinimumPeriodTimesTwo<Self>;
115 }
116
117 #[docify::export(timestamp)]
118 #[derive_impl(pezpallet_timestamp::config_preludes::TestDefaultConfig)]
119 impl pezpallet_timestamp::Config for Runtime {}
120
121 impl pezcumulus_pezpallet_aura_ext::Config for Runtime {}
122 }
123
124 #[docify::export(validate_block)]
125 pezcumulus_pezpallet_teyrchain_system::register_validate_block! {
126 Runtime = Runtime,
127 BlockExecutor = pezcumulus_pezpallet_aura_ext::BlockExecutor::<Runtime, Executive>,
128 }
129 }
130}