#blockchain #polkadot #omni #specification #substrate #polkadot-omni-node

app polkadot-omni-node

Generic binary that can run a parachain node with u32 block number and Aura consensus

4 releases (breaking)

0.5.0 Apr 4, 2025
0.4.0 Jan 29, 2025
0.3.0 Jan 14, 2025
0.0.0 Oct 8, 2024

#4 in #omni

Download history 109/week @ 2025-01-13 10/week @ 2025-01-20 121/week @ 2025-01-27 27/week @ 2025-02-03 3/week @ 2025-02-10 12/week @ 2025-02-17 15/week @ 2025-02-24 17/week @ 2025-03-03 17/week @ 2025-03-10 32/week @ 2025-03-17 105/week @ 2025-03-24 176/week @ 2025-03-31 78/week @ 2025-04-07 43/week @ 2025-04-14

408 downloads per month

Apache-2.0 and GPL-3.0-only

225KB
2.5K SLoC

Polkadot Omni Node

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.

Installation

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`"

Compile & install via cargo:

# Assuming ~/.cargo/bin is on the PATH
cargo install polkadot-omni-node

Usage

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.

1. Install chain-spec-builder

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

2. Generate a chain spec

Omni Node expects for the chain spec to contain parachains related fields like relay_chain and para_id. These fields can be introduced by running staging-chain-spec-builder with additional flags:

chain-spec-builder create --relay-chain <relay_chain_id> --para-id <id> -r <runtime.wasm> named-preset <preset_name>

3. Run Omni Node

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>

Dependencies

~181MB
~3M SLoC