| Crates.io | polkadot-omni-node |
| lib.rs | polkadot-omni-node |
| version | 0.13.0 |
| created_at | 2024-10-08 12:49:49.590991+00 |
| updated_at | 2025-12-19 07:26:15.011482+00 |
| description | Generic binary that can run a parachain node with u32 block number and Aura consensus |
| homepage | https://paritytech.github.io/polkadot-sdk/ |
| repository | https://github.com/paritytech/polkadot-sdk.git |
| max_upload_size | |
| id | 1401106 |
| size | 407,264 |
This is a white labeled implementation based on polkadot-omni-node-lib.
It can be used to start a parachain node from a provided chain spec file. It is only compatible with runtimes that use block
number u32 and Aura consensus.
Download & expose it via PATH:
# Download and set it on PATH.
wget https://github.com/paritytech/polkadot-sdk/releases/download/<stable_release_tag>/polkadot-omni-node
chmod +x polkadot-omni-node
export PATH="$PATH:`pwd`"
Replace
<stable_release_tag>with the latest stable tag from the Polkadot SDK releasesFor example:
wget https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2506-1/polkadot-omni-node
Compile & install via cargo:
# Assuming ~/.cargo/bin is on the PATH
cargo install polkadot-omni-node --locked
A basic example for an Omni Node run starts from a runtime which implements the sp_genesis_builder::GenesisBuilder.
The interface mandates the runtime to expose a named-preset.
Note: chain-spec-builder binary is published on crates.io under
staging-chain-spec-builder due to a name conflict.
Install it with cargo like bellow :
cargo install staging-chain-spec-builder --locked
Omni Node requires the chain spec to include a JSON key named relay_chain. It is set to a chain id,
representing the chain name, e.g. westend, paseo, rococo, polkadot, or kusama, but
there are also local variants that can be used for testing, like rococo-local or westend-local. The
local variants are available only for a build of polkadot-omni-node with
westend-native and rococo-native features respectively.
Additionaly, the --para-id flag can be used to set the JSON key named para_id. This flag is used
by nodes to determine the parachain id, and it is especially useful when the parachain id can not be
fetched from the runtime, when the state points to a runtime that does not implement the
cumulus_primitives_core::GetParachainInfo runtime API. It is recommended for runtimes to implement
the runtime API and be upgraded on chain.
Example command bellow:
chain-spec-builder create --relay-chain <relay_chain_id> --para-id <id> -r <runtime.wasm> named-preset <preset_name>
And now with the generated chain spec we can start the node in development mode like so:
polkadot-omni-node --dev --chain <chain_spec.json>