Skip to content

Latest commit

 

History

History
 
 

subspace

Visit our website Join our discord Visit our website

Deploy your VPS using our referral link to get 20€ bonus

Subspace node setup for Gemini Incentivized Testnet

Official documentation:

Minimum Specifications

  • CPU: 2 CPU
  • Memory: 4 GB RAM
  • Disk: 50 GB SSD Storage

Recommended hardware requirements

  • CPU: 4 CPU
  • Memory: 8 GB RAM
  • Disk: 200 GB SSD Storage

Required ports

Currently, TCP port 30333 needs to be exposed for node to work properly. If you have a server with no firewall, there is nothing to be done, but otherwise make sure to open TCP port 30333 for incoming connections.

Create Polkadot.js wallet

To create polkadot wallet:

  1. Download and install Browser Extension
  2. Navigate to Subspace Explorer and press Add account button
  3. Save mnemonic and create wallet
  4. This will generate wallet address that you will have to use later. Example of wallet address: st7QseTESMmUYcT5aftRJZ3jg357MsaAa93CFQL5UKsyGEk53

Set up your Subspace full node

Full node doesn't store the history and state of the whole blockchain, only last 1024 blocks

Option 1 (automatic)

You can setup your Subspace full node in few minutes by using automated script below

wget -O subspace_fullnode.sh https://raw.githubusercontent.com/kj89/testnet_manuals/main/subspace/subspace_fullnode.sh && chmod +x subspace_fullnode.sh && ./subspace_fullnode.sh

Option 2 (manual)

You can follow manual guide if you better prefer setting up node manually

Check you node in the telemetry

When you have finished setting up your node and farmer:

  1. Navigate to Subspace Gemini 1 Telemetry
  2. And start typing your node name that you privided before
  3. You should see yourself in the list like in the image below

image

Check your node synchronization

If output is false your node is synchronized

curl -s -X POST http://localhost:9933 -H "Content-Type: application/json" --data '{"id":1, "jsonrpc":"2.0", "method": "system_health", "params":[]}' | jq .result.isSyncing

Update the node

To upgrade your node to new binaries, please run the coommand below:

cd $HOME && rm -rf subspace-*
APP_VERSION=$(curl -s https://api.github.com/repos/subspace/subspace/releases/latest | jq -r ".tag_name" | sed "s/runtime-/""/g")
wget -O subspace-node https://github.com/subspace/subspace/releases/download/${APP_VERSION}/subspace-node-ubuntu-x86_64-${APP_VERSION}
wget -O subspace-farmer https://github.com/subspace/subspace/releases/download/${APP_VERSION}/subspace-farmer-ubuntu-x86_64-${APP_VERSION}
chmod +x subspace-*
mv subspace-* /usr/local/bin/
systemctl restart subspaced
sleep 30
systemctl restart subspaced-farmer

Fix error while loading shared libraries

If you see error: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory

sudo apt update && sudo apt install ocl-icd-opencl-dev libopencl-clang-dev libgomp1 -y

Reset the node

If you were running a node previously, and want to switch to a new snapshot, please perform these steps and then follow the guideline again:

subspace-farmer wipe
subspace-node purge-chain --chain gemini-1 -y
systemctl restart subspaced
sleep 30
systemctl restart subspaced-farmer

Usefull commands

Check node and farmer version

subspace-farmer --version && subspace-node --version

Check node status

service subspaced status

Check farmer status

service subspaced-farmer status

Check node logs

journalctl -u subspaced -f -o cat

Check farmer logs

journalctl -u subspaced-farmer -f -o cat

You should see something similar in the logs:

2022-02-03 10:52:23 Subspace
2022-02-03 10:52:23 ✌️  version 0.1.0-35cf6f5-x86_64-ubuntu
2022-02-03 10:52:23 ❤️  by Subspace Labs <https://subspace.network>, 2021-2022
2022-02-03 10:52:23 📋 Chain specification: Subspace Gemini 1
2022-02-03 10:52:23 🏷  Node name: YOUR_FANCY_NAME
2022-02-03 10:52:23 👤 Role: AUTHORITY
2022-02-03 10:52:23 💾 Database: RocksDb at /home/X/.local/share/subspace-node-x86_64-ubuntu-20.04-snapshot-2022-jan-05/chains/subspace_test/db/full
2022-02-03 10:52:23 ⛓  Native runtime: subspace-100 (subspace-1.tx1.au1)
2022-02-03 10:52:23 🔨 Initializing Genesis block/state (state: 0x22a5…17ea, header-hash: 0x6ada…0d38)
2022-02-03 10:52:24 ⏱  Loaded block-time = 1s from block 0x6ada0792ea62bf3501abc87d92e1ce0e78ddefba66f02973de54144d12ed0d38
2022-02-03 10:52:24 Starting archiving from genesis
2022-02-03 10:52:24 Archiving already produced blocks 0..=0
2022-02-03 10:52:24 🏷  Local node identity is: 12D3KooWBgKtea7MVvraeNyxdPF935pToq1x9VjR1rDeNH1qecXu
2022-02-03 10:52:24 🧑‍🌾 Starting Subspace Authorship worker
2022-02-03 10:52:24 📦 Highest known block at #0
2022-02-03 10:52:24 〽️ Prometheus exporter started at 127.0.0.1:9615
2022-02-03 10:52:24 Listening for new connections on 0.0.0.0:9944.
2022-02-03 10:52:26 🔍 Discovered new external address for our node: /ip4/176.233.17.199/tcp/30333/p2p/12D3KooWBgKtea7MVvraeNyxdPF935pToq1x9VjR1rDeNH1qecXu
2022-02-03 10:52:29 ⚙️  Syncing, target=#215883 (2 peers), best: #55 (0xafc7…bccf), finalized #0 (0x6ada…0d38), ⬇ 850.1kiB/s ⬆ 1.5kiB/s

To delete node

sudo systemctl stop subspaced subspaced-farmer
sudo systemctl disable subspaced subspaced-farmer
rm -rf ~/.local/share/subspace*
rm -rf /etc/systemd/system/subspaced*
rm -rf /usr/local/bin/subspace*