You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop/toolkit/parachains/polkadot-omni-node.md
+93-1Lines changed: 93 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,4 +96,96 @@ By default, `polkadot-omni-node` exposes a WebSocket endpoint at `ws://localhost
96
96
-[Polkadot.js Apps](https://polkadot.js.org/apps/#/explorer){target=\_blank} — a web-based interface for exploring and interacting with Polkadot SDK-based chains
97
97
- Custom scripts using compatible [libraries](/develop/toolkit/api-libraries/){target=\_blank}
98
98
99
-
Once connected, you can review blocks, call extrinsics, inspect storage, and interact with the runtime.
99
+
Once connected, you can review blocks, call extrinsics, inspect storage, and interact with the runtime.
100
+
101
+
## Parachain Compatibility
102
+
103
+
The `polkadot-omni-node` is designed to work with most parachains out of the box; however, your parachain's runtime must meet specific requirements and follow certain conventions to be compatible. This section outlines what your runtime needs to implement and configure to work seamlessly with the `polkadot-omni-node`:
104
+
105
+
- Your runtime must implement the required runtime APIs (see below).
106
+
- Your runtime must include and configure the required pallets.
107
+
108
+
The [`parachain-template`](https://github.com/paritytech/polkadot-sdk-parachain-template/tree/v0.0.4){target=_blank} provides a complete reference implementation that is fully compatible with the `polkadot-omni-node`. You can use it as a starting point or reference for ensuring your runtime meets all compatibility requirements.
109
+
110
+
### Required Runtime APIs
111
+
112
+
Your parachain runtime must implement the following runtime APIs for the `polkadot-omni-node` to function properly:
113
+
114
+
-**GetParachainInfo Runtime API**: The omni-node requires the [`GetParachainInfo`](https://paritytech.github.io/polkadot-sdk/master/cumulus_primitives_core/trait.GetParachainInfo.html){target=\_blank} runtime API to identify and configure the parachain correctly. This API provides the parachain ID to the node.
-**AuraRuntimeAPI**:Forconsensus, the `polkadot-omni-node` expectsthe [AuraruntimeAPI](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_frame/runtime/apis/trait.AuraApi.html){target=\_blank} to be implemented:
-**SystemPallet**:TheSystempallet ([`frame-system`](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_frame/prelude/frame_system/index.html){target=\_blank}) is fundamental and must be configured with appropriate types:
144
+
145
+
```rusttitle="runtime/src/lib.rs"
146
+
#[frame_support::runtime]
147
+
implframe_system::ConfigforRuntime {
148
+
typeBlock=Block;
149
+
typeBlockNumber=BlockNumber;
150
+
// ... other configurations
151
+
}
152
+
153
+
// Must be named "System" for omni-node compatibility
154
+
pubtypeSystem=frame_system::Pallet<Runtime>;
155
+
```
156
+
157
+
-**ParachainSystemPallet**:Thispallet ([`cumulus-pallet-parachain-system`](https://paritytech.github.io/polkadot-sdk/master/cumulus_pallet_parachain_system/index.html){target=\_blank}) enables parachain functionality and handles low-level details of being a parachain:
Ifyou'remigratinganexistingparachaintouse the `polkadot-omni-node`, you may need to perform runtime upgrades to add the required runtime APIs and pallets.Follow the standard parachain [runtime upgrade](/develop/parachains/maintenance/runtime-upgrades/){target=\_blank} procedures to implement these changes on your live network.
Copy file name to clipboardExpand all lines: llms.txt
+92Lines changed: 92 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16882,6 +16882,98 @@ By default, `polkadot-omni-node` exposes a WebSocket endpoint at `ws://localhost
16882
16882
- Custom scripts using compatible [libraries](/develop/toolkit/api-libraries/){target=\_blank}
16883
16883
16884
16884
Once connected, you can review blocks, call extrinsics, inspect storage, and interact with the runtime.
16885
+
16886
+
## Parachain Compatibility
16887
+
16888
+
The `polkadot-omni-node` is designed to work with most parachains out of the box; however, your parachain's runtime must meet specific requirements and follow certain conventions to be compatible. This section outlines what your runtime needs to implement and configure to work seamlessly with the `polkadot-omni-node`:
16889
+
16890
+
- Your runtime must implement the required runtime APIs (see below).
16891
+
- Your runtime must include and configure the required pallets.
16892
+
16893
+
The [`parachain-template`](https://github.com/paritytech/polkadot-sdk-parachain-template/tree/v0.0.4){target=_blank} provides a complete reference implementation that is fully compatible with the `polkadot-omni-node`. You can use it as a starting point or reference for ensuring your runtime meets all compatibility requirements.
16894
+
16895
+
### Required Runtime APIs
16896
+
16897
+
Your parachain runtime must implement the following runtime APIs for the `polkadot-omni-node` to function properly:
16898
+
16899
+
- **GetParachainInfo Runtime API**: The omni-node requires the [`GetParachainInfo`](https://paritytech.github.io/polkadot-sdk/master/cumulus_primitives_core/trait.GetParachainInfo.html){target=\_blank} runtime API to identify and configure the parachain correctly. This API provides the parachain ID to the node.
16900
+
16901
+
```rust title="runtime/src/apis.rs"
16902
+
impl cumulus_primitives_core::GetParachainInfo<Block> for Runtime {
- **Aura Runtime API**: For consensus, the `polkadot-omni-node` expects the [Aura runtime API](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_frame/runtime/apis/trait.AuraApi.html){target=\_blank} to be implemented:
16911
+
16912
+
```rust title="runtime/src/apis.rs"
16913
+
impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
Your runtime must include and properly configure the following pallets:
16927
+
16928
+
- **System Pallet**: The System pallet ([`frame-system`](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_frame/prelude/frame_system/index.html){target=\_blank}) is fundamental and must be configured with appropriate types:
16929
+
16930
+
```rust title="runtime/src/lib.rs"
16931
+
#[frame_support::runtime]
16932
+
impl frame_system::Config for Runtime {
16933
+
type Block = Block;
16934
+
type BlockNumber = BlockNumber;
16935
+
// ... other configurations
16936
+
}
16937
+
16938
+
// Must be named "System" for omni-node compatibility
16939
+
pub type System = frame_system::Pallet<Runtime>;
16940
+
```
16941
+
16942
+
- **ParachainSystem Pallet**: This pallet ([`cumulus-pallet-parachain-system`](https://paritytech.github.io/polkadot-sdk/master/cumulus_pallet_parachain_system/index.html){target=\_blank}) enables parachain functionality and handles low-level details of being a parachain:
16943
+
16944
+
```rust title="runtime/src/lib.rs"
16945
+
impl cumulus_pallet_parachain_system::Config for Runtime {
16946
+
type RuntimeEvent = RuntimeEvent;
16947
+
type OnSystemEvent = ();
16948
+
// ... other configurations
16949
+
}
16950
+
16951
+
// Must be named "ParachainSystem" for omni-node compatibility
16952
+
pub type ParachainSystem = cumulus_pallet_parachain_system::Pallet<Runtime>;
16953
+
```
16954
+
16955
+
- **Aura Pallet**: For block authoring consensus ([`pallet-aura`](https://paritytech.github.io/polkadot-sdk/master/pallet_aura/index.html){target=\_blank}):
16956
+
16957
+
```rust title="runtime/src/lib.rs"
16958
+
impl pallet_aura::Config for Runtime {
16959
+
type AuthorityId = AuraId;
16960
+
type DisabledValidators = ();
16961
+
type MaxAuthorities = MaxAuthorities;
16962
+
type AllowMultipleBlocksPerSlot = ConstBool<false>;
pub type ParachainInfo = parachain_info::Pallet<Runtime>;
16974
+
```
16975
+
16976
+
If you're migrating an existing parachain to use the `polkadot-omni-node`, you may need to perform runtime upgrades to add the required runtime APIs and pallets. Follow the standard parachain [runtime upgrade](/develop/parachains/maintenance/runtime-upgrades/){target=\_blank} procedures to implement these changes on your live network.
0 commit comments