cumulus_test_runtime/
flavors.rs1pub mod spec_version_incremented {
18 #[cfg(feature = "std")]
19 include!(concat!(env!("OUT_DIR"), "/wasm_binary_spec_version_incremented.rs"));
20}
21
22pub mod relay_parent_offset {
23 #[cfg(feature = "std")]
24 include!(concat!(env!("OUT_DIR"), "/wasm_binary_relay_parent_offset.rs"));
25}
26
27pub mod elastic_scaling_500ms {
28 #[cfg(feature = "std")]
29 include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling_500ms.rs"));
30}
31
32pub mod elastic_scaling {
33 #[cfg(feature = "std")]
34 include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling.rs"));
35}
36
37pub mod elastic_scaling_12s_slot {
38 #[cfg(feature = "std")]
39 include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling_12s_slot.rs"));
40}
41
42pub mod block_bundling {
43 #[cfg(feature = "std")]
44 include!(concat!(env!("OUT_DIR"), "/wasm_binary_block_bundling.rs"));
45}
46
47pub mod sync_backing {
48 #[cfg(feature = "std")]
49 include!(concat!(env!("OUT_DIR"), "/wasm_binary_sync_backing.rs"));
50}
51
52pub mod async_backing {
53 #[cfg(feature = "std")]
54 include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
55}
56
57pub mod async_backing_v3 {
58 #[cfg(feature = "std")]
59 include!(concat!(env!("OUT_DIR"), "/wasm_binary_async_backing_v3.rs"));
60}
61
62pub mod async_backing_v3_rpo {
63 #[cfg(feature = "std")]
64 include!(concat!(env!("OUT_DIR"), "/wasm_binary_async_backing_v3_rpo.rs"));
65}
66
67pub mod elastic_scaling_v3 {
68 #[cfg(feature = "std")]
69 include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling_v3.rs"));
70}
71
72pub mod slot_duration_18s {
73 #[cfg(feature = "std")]
74 include!(concat!(env!("OUT_DIR"), "/wasm_binary_slot_duration_18s.rs"));
75}
76
77pub mod with_authority_discovery {
78 #[cfg(feature = "std")]
79 include!(concat!(env!("OUT_DIR"), "/wasm_binary_with_authority_discovery.rs"));
80}
81
82pub(crate) const SCHEDULING_V3_ENABLED: bool = cfg!(feature = "v3-descriptor");
83
84pub(crate) const fn relay_parent_offset() -> u32 {
85 if cfg!(feature = "relay-parent-offset-2") {
86 return 2;
87 }
88
89 if cfg!(feature = "with-authority-discovery") {
90 return 2;
91 }
92
93 0
94}
95
96pub(crate) const fn slot_duration() -> u64 {
97 if cfg!(feature = "18s-slot") {
98 return 18000;
99 }
100
101 if cfg!(feature = "12s-slot") {
102 return 12000;
103 }
104
105 6000
106}
107
108pub(crate) const fn block_processing_velocity() -> u32 {
109 if cfg!(feature = "velocity-12") {
110 return 12;
111 }
112
113 if cfg!(feature = "velocity-6") {
114 return 6;
115 }
116
117 if cfg!(feature = "velocity-3") {
118 return 3;
119 }
120
121 1
122}
123
124pub(crate) const fn unincluded_segment_capacity() -> u32 {
125 if cfg!(feature = "sync-backing") {
126 return 1;
127 }
128
129 block_processing_velocity() * (3 + relay_parent_offset())
141}