catch { snail }

Gear Node Setup

March 08, 2022

Content

-Few notes:

  1. This is not official guide
  2. UPDATE: if you were using our guide to install gear node then you can execute same command to update the node
  3. The node is in active development stage, there is nothing to validate and there are no rewards. When the stablenet will be launched, there will be many opportunities to earn real rewards.
  4. No special hardware is needed. As long as you have a hard drive, 2 CPU cores and 2G of RAM you’ll be fine.
  5. I have tested on Ubuntu 20.04.4 LTS

-Linux Setup/Update

Before running a node make sure that your system clock is synchronized - this is important. On Ubuntu 20.04 the system clock should be synchronized by default. To verify, run the following command and check the output.

timedatectl | grep "System clock"

Output

System clock synchronized: yes

If the output is different, then you can install NTP manually and verify again that your system clock is synchronized:

apt install ntp
ntpq -p

Install/Update Gear node with one-line script from the source code. Tested on Ubuntu 20.04.4 LTS.

It can take from 10 minutes to few hours depending from your hardware to install/update the node.

wget -q -O gear.sh https://api.zvalid.com/gear.sh && chmod +x gear.sh && sudo /bin/bash gear.sh

-Check node logs

journalctl -u gear-node.service -f

If everything went through fine, then you should see your node(by node name) here Telemetry

-Usefull commands

To check the node status (if node is in syncing state, number of peers), execute following command in the terminal
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "system_health", "params":[]}' http://localhost:9933

Output

{"jsonrpc":"2.0","result":{"isSyncing":false,"peers":47,"shouldHavePeers":true},"id":1}
To view current node block
$ curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "system_syncState", "params":[]}' http://localhost:9933

Output

{"jsonrpc":"2.0","result":{"currentBlock":681580,"highestBlock":681580,"startingBlock":0},"id":1}

Good Luck!


My personal notes.
I write about code.

© 2022, Built with Gatsby and a tiny Snail