ParaState Testnet Node Setup Guide

Purnima Behera
3 min readMay 27, 2021

Here i will share how to set up a ParaState node to join our testnet. After that, you could submit a request to join the validator group.

Hardware requirement:

  • CPU: 2.0 GHz x86–64 CPU
  • Memory: 8GB RAM
  • Disk: 500GB High-Speed Storage (SSD)

Lets do the Node set up

There are two ways to setup environment:

  • Docker Image
  • Manual Installation

Docker Image

first install docker in your ubuntu Machine .

Get our secondstate/substrate-ssvm docker image from Docker Hub:

docker pull secondstate/substrate-ssvm
docker run -it --rm \
-v $PWD/frontier:/root/frontier \
-w /root/frontier \
-p 30333:30333 \
-p 9933:9933 \
-p 9944:9944 \
secondstate/substrate-ssvm bash

Manual Installation

i recommend to use Ubuntu 20.04 only .

apt update 
apt install -y \
software-properties-common \
wget \
cmake \
ninja-build \
curl \
git \
libboost-all-dev \
llvm-dev \
liblld-10-dev \
clang
# Install nodejs
curl -sL https://deb.nodesource.com/setup_14.x | bash
apt install -y nodejs
# Install yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
apt update && apt install -y yarn
# Install rust
curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
rustup update nightly && rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly

Expose ports

  • 30333: Default p2p traffic port. Make sure you expose this port externally.
  • 9933: Default RPC traffic port.
  • 9944: Default WebSocket traffic port.

Generate Your Own Keys

You will need to have the Substrate build dependencies to install Subkey. Use the following two commands to install the dependencies and Subkey, respectively:

Command:

# Use the `--fast` flag to get the dependencies without needing to install the Substrate and Subkey binary
curl https://getsubstrate.io -sSf | bash -s -- --fast
# Install only `subkey`, at a specific version
cargo install --force subkey --git https://github.com/paritytech/substrate --version 2.0.1 --locked
# Generate a mnemonic and see the sr25519 key and address
subkey generate --scheme sr25519

# Use the same mnemonic to see ed25519 key and address
subkey inspect --scheme ed25519 "<Your Mnemonic>"

Add Your Key to Your ParaState Node

Follow Add Keys to Keystore tutorial from Substrate Developer Hub to add previous generated keys to your node:

Run command (your PC!) with this:

ssh -N -L 9944:127.0.0.1:9944 root@xx.xx.xx.xx

This is going to connect your IP with node so you can see yourself at Polkadot-JS Apps UI.

  • We need to use the author.insertKey RPC call to add keys. Here you need to restart your node with --rpc-methods Unsafe temporary. You should restart your node without this flag after adding keys.
  • Go to Polkadot-JS Apps UI and connect it to your node. (Reminder: You might need to restart your node with the --unsafe-ws-external flag to connect from a different host.)
  • Navigate to Developer -> RPC Call and choose author and insertKey with the following arguments for Aura key:
  • keytype: aura
  • suri: <Your Mnemonic> (eg. clip organ olive upper oak void inject side suit toilet stick narrowly)
  • publicKey: <Your Raw sr25519 Key>

Insert againt with GRANDPA key:

  • keytype: gran
  • suri: <Your Mnemonic> (eg. clip organ olive upper oak void inject side suit toilet stick narrow)
  • publicKey: <Your Raw ed25519 Key>

Final step is to join validator set.

Developer -> RPC Call and choose author and rotateKeys()

Submit and copy result.

Developer -> Extrinsics and choose session and setKeys(keys, proof). Paste copied hex value (rotate keys) to keys field and set 0x00 to the proof field. you can use alice account to submit transaction as we are waiting for test tokens.

--

--