[Deprecated] ParaState Testnet Node Setup Guideline (for ParaState Testnet 2021 04 22) - ParaState/frontier GitHub Wiki
This guideline is deprecated. Just for our deprecated testnet. Check the latest guideline here.
TOC
In this guide, you will learn how to set up a ParaState node to join our testnet. After that, you could submit a request to join the validator group.
Recommended Hardware
- CPU: 2.0 GHz x86-64 CPU
- Memory: 8GB RAM
- Disk: 500GB High-Speed Storage (SSD)
- For your reference, we deploy our own ParaTime node on Azure
D2s_v3instances (2 VCPU, 8GB Memory, 500GB Disk space)
Setup a ParaState Node
Environment
We provide two ways to setup environment:
- Docker Image
- Manual Installation
Here we recommend using docker image to set up the working environment.
Docker Image
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
We only support Ubuntu 18.04 and Ubuntu 20.04. Please use Ubuntu 18.04/20.04 to set up a machine.
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'll need your own keys to run a ParaState node. Follow Generate Your Own Keys tutorial from Substrate Developer Hub:
# Install subkey tool
curl https://getsubstrate.io -sSf | bash -s -- --fast
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>"


Run ParaState Node
The following scripts will start a ParaState node and connect to ParaState Testnet (2021-04-22):
git clone https://github.com/ParaState/frontier.git -b testnet-2021-04-22
cd frontier
cargo run --release --bin frontier-template-node -- \
--execution=Native \
--base-path ./data \
--chain ./specs/2021-04-22-spec-raw.json \
--port 30333 \
--rpc-port 9933 \
--ws-port 9944 \
--validator \
--telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
--name '<Your Node Name>' \
--bootnodes /ip4/13.67.57.72/tcp/30333/p2p/12D3KooWNwpkJk3f4fUEc9cjSzLC5xE3opf25pjt7izfNGc1v5Tu
After your node starts importing blocks, you could check your node status at Polkadot Telemetry.
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:
- We need to use the
author.insertKeyRPC call to add keys. Here you need to restart your node with--rpc-methods Unsafetemporary. 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-externalflag to connect from a different host.) - Navigate to
Developer -> RPC Calland chooseauthorandinsertKeywith the following arguments for Aura key:keytype:aurasuri:<Your Mnemonic>(eg. clip organ olive upper oak void inject side suit toilet stick narrow)publicKey:<Your Raw sr25519 Key>(eg. 0x9effc1668ca381c242885516ec9fa2b19c67b6684c02a8a3237b6862e5c8cd7e)

- Insert againt with GRANDPA key:
keytype:gransuri:<Your Mnemonic>(eg. clip organ olive upper oak void inject side suit toilet stick narrow)publicKey:<Your Raw ed25519 Key>(eg. 0xb48004c6e1625282313b07d1c9950935e86894a2e4f21fb1ffee9854d180c781)
- Navigate to
Accounts -> Accountsand chooseAdd account. Use your mnemonic seed to create an account at your browser.
images/guideline/add-account.png
Update Developer Settings
- Go to Polkadot-JS Apps UI and connect it to your node. (Reminder: You might need to restart your node with the
--unsafe-ws-externalflag to connect from a different host.) - Navigate to
Settings -> Developerand paste the following json:
{
"Address": "MultiAddress",
"LookupSource": "MultiAddress",
"Keys": "SessionKeys2",
"Account": {
"nonce": "U256",
"balance": "U256"
},
"Transaction": {
"nonce": "U256",
"action": "String",
"gas_price": "u64",
"gas_limit": "u64",
"value": "U256",
"input": "Vec<u8>",
"signature": "Signature"
},
"Signature": {
"v": "u64",
"r": "H256",
"s": "H256"
}
}
Request to Join Validator Set
At the next step Set Your Rotate Keys, you will need some balance at you validator account. Therefore, you need to fill this form (TBD) to submit your validator account (sr25519) before the next step. We'll transfer some token to your validator account so that you can set up your rotate keys.
Set Your Rotate Keys
When you receive our notification about joining the Validator Set, we will delegate some tokens to your validator account. This will give your account permission to set your rotate keys.
When you want to join the ParaState validator set, you need to follow these steps:
- Restart your node with
--rpc-methods Unsafetemporary forauthor.rotateKeys()RPC call. - Go to Polkadot-JS Apps UI and connect it to your node. (Reminder: You might need to restart your node with the
--unsafe-ws-externalflag to connect from a different host.) - Navigate to
Developer -> RPC Calland chooseauthorandrotateKeys():

- Copy the hex value result.
- (GET BALANCE BEFORE THIS STEP) Navigate to
Developer -> Extrinsics. Select the account you added from your mnemonic seed and choosesessionandsetKeys(keys, proof). Paste copied hex value (rotate keys) to keys field and set0x00to the proof field:
- After setting keys, please file a request to become a ParaState Testnet validator. You'll be added to the validator set once our admin approves your request.
Join ParaState Validator Set
We plan to open the validator set registration at (TBD Date). Here is the timeline and number of validator slots:
- In the first month, 10 validator slots opened
- In the second month, the validator slots doubled, 20 validator slots opened
- In the third month, the validator slots doubled, 40 validator slots opened
- In the fourth month, the validator slots doubled, 80 validator slots opened
- After the fifth month, the validator slots are set to unlimited. Try to accept validators as many as possible.
To join the ParaState validator set, Fill this form (TBD) to submit your validator account (sr25519). We'll announce the validator set at the beginning of each month.