Run Full Node

Overview

For users and partners, maintaining a full node could sync blockchain data with a Parallel network timely, get a locally RPC endpoint, etc.

Requirements

Here are the recommended system specs but not the minimum requirements,

CPU: 8 Cores

RAM: 16 GB

SSD: 300 GB

Create new user and add to sudo group

sudo bash -c "echo '%sudo   ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers"
sudo adduser parallel --home /home/parallel
sudo usermod -aG sudo parallel

Note: all future instructions should be done using this new created user. DONT USE ROOT!

sudo su - parallel

Install tools & docker

sudo apt install -y p7zip-full jq \
  && curl -fsSL https://get.docker.com | bash -s docker \
  && sudo usermod -aG docker parallel

Run From Docker

Running full node from docker is the easiest way, we recommend keeping the node version consistent with the production environment.

If the current version is as below:

WASM version: parallel/189

Node version: Parallel Node v1.9.0

Then Docker Image v1.9.0 is recommended:

docker pull parallelfinance/parallel:v1.9.0

Sync from scratch (not recommand)

A full node can sync from scratch, full-node.sh can be found on the Resources page:

// startup
// heiko-rpc-client will appear on telemetry
bash full-node.sh heiko-rpc-client v1.9.0

Sync from snapshot (recommand)

create-volume.sh can be found on the Resources page:

// This will take some time to download snapshot
bash create-volume.sh --heiko
bash create-volume.sh --kusama
bash full-node.sh heiko-rpc-client v1.9.0

After launching the node, it'll listen by default on the following ports:

  • 9933 HTTP

  • 9944 Websocket

  • 9934 Relaychain HTTP

  • 9945 Relaychain Websocket

For using websocket, you can definitely connect to raw: ws://127.0.0.1:9944 or http://127.0.0.1:9933 to communicate with our chain, but we would recommand creating certificates and put them behind a domain then access them via wss:// and https:// so that your message get encrypted

Status check

A few minutes later, you should then be able to find your rpc node on the following telemetry page if you dont have outbound firewall blocking this.

If you choose to Sync from scratch you should see the block number keep growing.from a rather small number like 1000

If you choose to Sync from snapshot you should see the block number is already at a very big number like > 1000000

You'll need to wait the rpc node to catch up to nearly the latest heiko OR paralle block to be able to send transactions to it, you can refer to: https://parallelfi.gitbook.io/parallel-finance/polkadot-network/developer-docs/wallet/integration/api for transactions example. All you need to do is just replacing the websocket endpoint

Logs

docker logs --tail 10 -f heiko-rpc-client

2022-07-29 03:11:09 Accepting new connection, 108/4096
2022-07-29 03:11:11 Accepting new connection, 36/4096
2022-07-29 03:11:11 [Parachain] 💤 Idle (16 peers), best: #1636601 (0x83dc…4510), finalized #1636600 (0x122a…9c64), ⬇ 3.0kiB/s ⬆ 20.5kiB/s
2022-07-29 03:11:12 [Relaychain] ✨ Imported #13767393 (0xa07f…a62b)
2022-07-29 03:11:14 [Relaychain] 💤 Idle (41 peers), best: #13767393 (0xa07f…a62b), finalized #13767388 (0xfba9…d5a7), ⬇ 176.3kiB/s ⬆ 195.6kiB/s
2022-07-29 03:11:15 Accepting new connection, 108/4096
2022-07-29 03:11:16 [Parachain] 💤 Idle (16 peers), best: #1636601 (0x83dc…4510), finalized #1636600 (0x122a…9c64), ⬇ 1.1kiB/s ⬆ 0.9kiB/s
2022-07-29 03:11:18 [Relaychain] ✨ Imported #13767394 (0x0f55…3677)
2022-07-29 03:11:19 [Relaychain] 💤 Idle (41 peers), best: #13767394 (0x0f55…3677), finalized #13767390 (0x3874…9d70), ⬇ 248.5kiB/s ⬆ 844.1kiB/s
2022-07-29 03:11:20 Accepting new connection, 36/4096
2022-07-29 03:11:21 [Parachain] ✨ Imported #1636603 (0xb95d…c016)
2022-07-29 03:11:21 [Parachain] 💤 Idle (16 peers), best: #1636602 (0xc59e…f06e), finalized #1636600 (0x122a…9c64), ⬇ 3.1kiB/s ⬆ 21.2kiB/s
2022-07-29 03:11:22 Accepting new connection, 36/4096        

Last updated