Skip to content

Commit 0079040

Browse files
committed
Improve docs
1 parent 9f3881c commit 0079040

File tree

2 files changed

+134
-58
lines changed

2 files changed

+134
-58
lines changed

develop/toolkit/parachains/polkadot-omni-node.md

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,66 +7,84 @@ description: Run parachain nodes easily with the polkadot-omni-node, a white-lab
77

88
## Introduction
99

10-
The [`polkadot-omni-node`]((https://crates.io/crates/polkadot-omni-node/{{dependencies.crates.polkadot_omni_node.version}})){target=\_blank} stands as a versatile, pre-built binary designed to simplify the operation of nodes for a multitude of parachains. Its core capability lies in its independence from specific runtime code. Instead, it operates by ingesting a chain specification, adapting its functionality based on this input.
10+
The [`polkadot-omni-node`]((https://crates.io/crates/polkadot-omni-node/{{dependencies.crates.polkadot_omni_node.version}})){target=\_blank} is a versatile, pre-built binary designed to simplify running parachains in the Polkadot ecosystem. Unlike traditional node binaries that are tightly coupled to specific runtime code, the `polkadot-omni-node` operates using an external [chain specification](polkadot-protocol/glossary#chain-specification){target=\_blank} file, allowing it to adapt dynamically to different parachains.
1111

12-
This unique property allows the `polkadot-omni-node` to function as a "white-labeled" solution, capable of running most parachains that do not require node-level customizations.
12+
This approach enables it to act as a white-labeled node binary, capable of running most parachains that do not require custom node-level logic or extensions. Developers can leverage this flexibility to test, deploy, or operate parachain nodes without maintaining a dedicated codebase for each network.
1313

14-
This guide provides a comprehensive guide for developers seeking to leverage the `polkadot-omni-node` to run a full node for their chosen parachain.
14+
This guide provides step-by-step instructions for installing the `polkadot-omni-node`, obtaining a chain specification, and launching a parachain node.
1515

1616
## Prerequisites
1717

1818
Before getting started, ensure you have the following prerequisites:
1919

20-
- [Rust](https://www.rust-lang.org/tools/install){target=_blank} installed on your operating system
20+
- **[Rust](https://www.rust-lang.org/tools/install){target=_blank}** - required to build and install the polkadot-omni-node binary
21+
22+
Ensure Rust's `cargo` command is available in your terminal by running:
23+
24+
```bash
25+
cargo --version
26+
```
2127

2228
## Install the Polkadot Omni Node
2329

24-
To install the `polkadot-omni-node` globally, execute the the following command:
30+
To install the `polkadot-omni-node` globally using `cargo`, run:
2531

2632
```bash
2733
cargo install --locked polkadot-omni-node@{{dependencies.crates.polkadot_omni_node.version}}
2834
```
2935

30-
This command will download and install the version {{dependencies.crates.polkadot_omni_node.version}} of the `polkadot-omni-node` binary, making it available for use in your development environment.
36+
This command downloads and installs version {{dependencies.crates.polkadot_omni_node.version}} of the binary, making it available system-wide.
3137

32-
Verify the installation by checking the installed version by running:
38+
To confirm the installation, run:
3339

3440
```bash
3541
polkadot-omni-node --version
3642
```
3743

38-
This should return the version number of the installed `polkadot-omni-node`, confirming that the installation was successful.
44+
You should see the installed version number printed to the terminal, confirming a successful installation.
3945

4046
## Obtain Chain Specifications
4147

42-
The `polkadot-omni-node` relies on a chain specification file to understand the network configuration of the parachain you intend to run. These JSON files detail the genesis state and runtime settings of the blockchain.
48+
The `polkadot-omni-node` uses a chain specification file to configure and launch a parachain node. This file defines the parachain's genesis state and network settings.
49+
50+
The most common source for official chain specifications is the [paritytech/chainspecs](https://github.com/paritytech/chainspecs){target=\_blank} repository. These specifications are also browsable in a user-friendly format via the [Chainspect Collection](https://paritytech.github.io/chainspecs/){target=\_blank} website.
51+
52+
To obtain a chain specification:
4353

44-
The primary source for chain specification files is the [paritytech/chainspecs](https://github.com/paritytech/chainspecs){target=\_blank} repository. This repository contains chain specifications for various Polkadot ecosystem networks.
54+
1. Visit the [Chainspect Collection](https://paritytech.github.io/chainspecs/){target=\_blank} website
4555

46-
To obtain the chain specification for your desired parachain:
56+
2. Find the parachain you want to run
4757

48-
1. Navigate to the [Chainspect Collection](https://paritytech.github.io/chainspecs/){target=\_blank} website
49-
2. Locate the chain specification file corresponding to the parachain you wish to run
50-
3. Click on it to view the file's content. Copy it and save it as a .json file on your local machine
58+
3. Click the chain spec to open it
59+
60+
4. Copy the JSON content and save it locally as a .json file, e.g., `chain_spec.json`
5161

5262
## Running a Parachain Full Node
5363

54-
Once you have installed the `polkadot-omni-node` and downloaded the chain specification file, you can launch a full node for your chosen parachain.
64+
Once you've installed the `polkadot-omni-node` and saved the appropriate chain specification file, you can start a full node for your chosen parachain.
5565

56-
To check all the available options and flags for the `polkadot-omni-node`, you can run the following command in your terminal:
66+
To see all available flags and configuration options, run:
5767

5868
```bash
5969
polkadot-omni-node --help
6070
```
6171

62-
In order to run a parachain node, execute the `polkadot-omni-node` command replacing `./INSERT_PARACHAIN_CHAIN_SPEC.json` with the actual path to your downloaded file:
72+
To launch the node, run the following command, replacing `./INSERT_PARACHAIN_CHAIN_SPEC.json` with the actual path to your saved chain spec file.
73+
74+
This command will:
75+
76+
- Load the chain specification
77+
78+
- Initialize the node using the provided network configuration
79+
80+
- Begin syncing with the parachain network
6381

6482
```bash
6583
polkadot-omni-node --chain ./INSERT_PARACHAIN_CHAIN_SPEC.json --sync warp
6684
```
6785

68-
The node will start, load the chain specification, and begin the process of synchronizing with the network defined. You will see logs and status updates in your terminal reflecting the node's operation.
86+
- The `--chain` flag tells the `polkadot-omni-node` which parachain to run by pointing to its chain specification file
6987

70-
The `--chain` flag instructs the `polkadot-omni-node` to initialize and run a node based on the provided chain specification. Its architecture allows it to interpret the chain specification and operate as a full node for that specific parachain without needing a dedicated node binary.
88+
- The `--sync warp` flag enables warp sync, allowing the node to quickly catch up to the latest finalized state. Historical blocks are fetched in the background as the node continues operating
7189

72-
The `--sync` flag specifies the synchronization method. The `warp` option ensures that your node quickly updates to the latest finalized state. The historical blocks are downloaded in the background as the node continues to operate.
90+
Once started, the node will begin connecting to peers and syncing with the network. You’ll see logs in your terminal reflecting its progress.

llms.txt

Lines changed: 96 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Doc-Page: https://docs.polkadot.com/develop/toolkit/parachains/fork-chains/chops
6666
Doc-Page: https://docs.polkadot.com/develop/toolkit/parachains/fork-chains/
6767
Doc-Page: https://docs.polkadot.com/develop/toolkit/parachains/
6868
Doc-Page: https://docs.polkadot.com/develop/toolkit/parachains/light-clients/
69+
Doc-Page: https://docs.polkadot.com/develop/toolkit/parachains/polkadot-omni-node/
6970
Doc-Page: https://docs.polkadot.com/develop/toolkit/parachains/quickstart/
7071
Doc-Page: https://docs.polkadot.com/develop/toolkit/parachains/quickstart/pop-cli/
7172
Doc-Page: https://docs.polkadot.com/develop/toolkit/parachains/spawn-chains/
@@ -11341,6 +11342,100 @@ Substrate Connect automatically detects whether the user has the extension insta
1134111342
- [Light Clients - Polkadot Specification](https://spec.polkadot.network/sect-lightclient){target=\_blank}
1134211343
--- END CONTENT ---
1134311344

11345+
Doc-Content: https://docs.polkadot.com/develop/toolkit/parachains/polkadot-omni-node/
11346+
--- BEGIN CONTENT ---
11347+
---
11348+
title: Polkadot Omni Node
11349+
description: Run parachain nodes easily with the polkadot-omni-node, a white-labeled binary that can run parachain nodes using a single pre-built solution.
11350+
---
11351+
11352+
# Polkadot Omni Node
11353+
11354+
## Introduction
11355+
11356+
The [`polkadot-omni-node`]((https://crates.io/crates/polkadot-omni-node/{{dependencies.crates.polkadot_omni_node.version}})){target=\_blank} is a versatile, pre-built binary designed to simplify running parachains in the Polkadot ecosystem. Unlike traditional node binaries that are tightly coupled to specific runtime code, the `polkadot-omni-node` operates using an external [chain specification](polkadot-protocol/glossary#chain-specification){target=\_blank} file, allowing it to adapt dynamically to different parachains.
11357+
11358+
This approach enables it to act as a white-labeled node binary, capable of running most parachains that do not require custom node-level logic or extensions. Developers can leverage this flexibility to test, deploy, or operate parachain nodes without maintaining a dedicated codebase for each network.
11359+
11360+
This guide provides step-by-step instructions for installing the `polkadot-omni-node`, obtaining a chain specification, and launching a parachain node.
11361+
11362+
## Prerequisites
11363+
11364+
Before getting started, ensure you have the following prerequisites:
11365+
11366+
- **[Rust](https://www.rust-lang.org/tools/install){target=_blank}** - required to build and install the polkadot-omni-node binary
11367+
11368+
Ensure Rust's `cargo` command is available in your terminal by running:
11369+
11370+
```bash
11371+
cargo --version
11372+
```
11373+
11374+
## Install the Polkadot Omni Node
11375+
11376+
To install the `polkadot-omni-node` globally using `cargo`, run:
11377+
11378+
```bash
11379+
cargo install --locked polkadot-omni-node@{{dependencies.crates.polkadot_omni_node.version}}
11380+
```
11381+
11382+
This command downloads and installs version {{dependencies.crates.polkadot_omni_node.version}} of the binary, making it available system-wide.
11383+
11384+
To confirm the installation, run:
11385+
11386+
```bash
11387+
polkadot-omni-node --version
11388+
```
11389+
11390+
You should see the installed version number printed to the terminal, confirming a successful installation.
11391+
11392+
## Obtain Chain Specifications
11393+
11394+
The `polkadot-omni-node` uses a chain specification file to configure and launch a parachain node. This file defines the parachain's genesis state and network settings.
11395+
11396+
The most common source for official chain specifications is the [paritytech/chainspecs](https://github.com/paritytech/chainspecs){target=\_blank} repository. These specifications are also browsable in a user-friendly format via the [Chainspect Collection](https://paritytech.github.io/chainspecs/){target=\_blank} website.
11397+
11398+
To obtain a chain specification:
11399+
11400+
1. Visit the [Chainspect Collection](https://paritytech.github.io/chainspecs/){target=\_blank} website
11401+
11402+
2. Find the parachain you want to run
11403+
11404+
3. Click the chain spec to open it
11405+
11406+
4. Copy the JSON content and save it locally as a .json file, e.g., `chain_spec.json`
11407+
11408+
## Running a Parachain Full Node
11409+
11410+
Once you've installed the `polkadot-omni-node` and saved the appropriate chain specification file, you can start a full node for your chosen parachain.
11411+
11412+
To see all available flags and configuration options, run:
11413+
11414+
```bash
11415+
polkadot-omni-node --help
11416+
```
11417+
11418+
To launch the node, run the following command, replacing `./INSERT_PARACHAIN_CHAIN_SPEC.json` with the actual path to your saved chain spec file.
11419+
11420+
This command will:
11421+
11422+
- Load the chain specification
11423+
11424+
- Initialize the node using the provided network configuration
11425+
11426+
- Begin syncing with the parachain network
11427+
11428+
```bash
11429+
polkadot-omni-node --chain ./INSERT_PARACHAIN_CHAIN_SPEC.json --sync warp
11430+
```
11431+
11432+
- The `--chain` flag tells the `polkadot-omni-node` which parachain to run by pointing to its chain specification file
11433+
11434+
- The `--sync warp` flag enables warp sync, allowing the node to quickly catch up to the latest finalized state. Historical blocks are fetched in the background as the node continues operating
11435+
11436+
Once started, the node will begin connecting to peers and syncing with the network. You’ll see logs in your terminal reflecting its progress.
11437+
--- END CONTENT ---
11438+
1134411439
Doc-Content: https://docs.polkadot.com/develop/toolkit/parachains/quickstart/
1134511440
--- BEGIN CONTENT ---
1134611441
---
@@ -14228,44 +14323,7 @@ touch /etc/systemd/system/polkadot-validator.service
1422814323
In this unit file, you will write the commands that you want to run on server boot/restart:
1422914324

1423014325
```systemd title="/etc/systemd/system/polkadot-validator.service"
14231-
[Unit]
14232-
Description=Polkadot Node
14233-
After=network.target
14234-
Documentation=https://github.com/paritytech/polkadot
14235-
14236-
[Service]
14237-
EnvironmentFile=-/etc/default/polkadot
14238-
ExecStart=/usr/bin/polkadot $POLKADOT_CLI_ARGS
14239-
User=polkadot
14240-
Group=polkadot
14241-
Restart=always
14242-
RestartSec=120
14243-
CapabilityBoundingSet=
14244-
LockPersonality=true
14245-
NoNewPrivileges=true
14246-
PrivateDevices=true
14247-
PrivateMounts=true
14248-
PrivateTmp=true
14249-
PrivateUsers=true
14250-
ProtectClock=true
14251-
ProtectControlGroups=true
14252-
ProtectHostname=true
14253-
ProtectKernelModules=true
14254-
ProtectKernelTunables=true
14255-
ProtectSystem=strict
14256-
RemoveIPC=true
14257-
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
14258-
RestrictNamespaces=false
14259-
RestrictSUIDSGID=true
14260-
SystemCallArchitectures=native
14261-
SystemCallFilter=@system-service
14262-
SystemCallFilter=landlock_add_rule landlock_create_ruleset landlock_restrict_self seccomp mount umount2
14263-
SystemCallFilter=~@clock @module @reboot @swap @privileged
14264-
SystemCallFilter=pivot_root
14265-
UMask=0027
14266-
14267-
[Install]
14268-
WantedBy=multi-user.target
14326+
Failed to fetch snippet after 3 attempts
1426914327
```
1427014328

1427114329
!!! warning "Restart delay and equivocation risk"

0 commit comments

Comments
 (0)