Nethermind Node Setup

Instructions for setting up a Nethermind Client Node

If you experience any issues during installation, post questions here: https://forum.poa.network/c/xdai-chain/validators-support-private.

If you are migrating from a current OpenEthereum/Parity Node:

  1. We recommend preparing through step 4 below (update .env file) on a clean instance, but DO NOT launch ( do not proceed to step 5 docker-compose up -d) until you have stopped your current instance.

  2. Once your new node is prepared, stop your current OE/Parity instance

    1. If using docker, stop with docker-compose down

    2. If using an ansible deploment playbook, uninstall withsudo pip uninstall --yes ansible or follow these instructions https://howtoinstall.co/en/ubuntu/xenial/ansible?action=remove

  3. Once you have confirmed your previous node is stopped, proceed with step 5 below and launch the new instance. Initial sync should take about 15 minutes.

Validator Node Specs

Nethermind can be supported by a variety of cloud-based providers. Instructions are available here for UpCloud, which can be generalized to other providers. If you are already with a provider, we recommend launching a new, clean instance.

Minimum specifications:

  • OS: Ubuntu, Windows & MacOs. See supported platforms

  • CPU: minimum 2 cores

  • RAM: minimum 4GB

  • Disk: 50gb SSD

  • Open network ports: SSH port (default 22 TCP), 30303 UDP/TCP. For security purposes, close other ports.

  • Check that you have git installed git --version

    • if not, install it following instructions here

See the Nethermind Docs for additional information

Node setup

Login to your node to begin.

For basic instructions, see the github repo at https://github.com/xdaichain/validator-node-dockerized/tree/nethermind#readme

1) Install Docker Engine & Docker Compose

Installation instructions will vary based on OS. Follow the instructions here:

2) Sync Clock

Your clock should by synchronized to prevent skipping block sealing.

Entertimedatectl status , you should see similar output:

Local time: Tue 2020-06-30 17:16:19 UTC
Universal time: Tue 2020-06-30 17:16:19 UTC
RTC time: Tue 2020-06-30 17:16:19
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no

If System clock synchronized displays yes you are ready to go, proceed to step 3.

If not, you can either:

  • synchronize clock with NTP servers (allow UDP port 123 for both incoming and outgoing traffic) or

  • use the following script to sync with google.com:

Create fixtime.sh script and run it with watch -n 60 command in a screen

echo sudo date -s '"$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"' > fixtime.sh
chmod +x fixtime.sh
screen -S time
watch -n 60 ./fixtime.sh

Press Ctrl+A+D to leave the screen

3) Clone the Repo

$ git clone -b nethermind https://github.com/xdaichain/validator-node-dockerized
$ cd validator-node-dockerized

4) Update .env File

You will need your private mining key to proceed (see step 3 here to retrieve a key string using MetaMask)

Copy .env.example to .env and configure the .env file. Define the following settings.

ETHSTATS_ID=[validator_name]
ETHSTATS_CONTACT=[contact_email]
ETHSTATS_SECRET=[netstat_secret_key]
KEY=[your_private_key_for_mining_address]
SEQAPIKEY=[seq_api_key]
  • ETHSTATS_ID - The displayed name of your validator in Netstats

  • ETHSTATS_CONTACT - Validator's contact (e.g., e-mail)

  • ETHSTATS_SECRET - Secret key to connect to Netstat (Available here - request access to the forum to view - please keep it private)

  • KEY - Your mining address private key (64 characters long without leading 0x)

  • SEQAPIKEY - An API key for Seq log collector (should be provided by xDai team, please, request it).

5) Start the Node

$ docker-compose up -d

Once docker containers are created, the node will sync with the chain (may take a while).

After your docker container is created and started, it doesn't need the key anymore, so the key can be removed from .env for security reasons. But note, that if you down your container, you will need to specify the key again before you up (recreate) the docker container.

To restart, cd into the validator-node-dockerized directory and use docker-compose stop then docker-compose start

7) Check Logs

To check the logs and verify operations (look for the Sealed block log).

docker-compose logs -f nethermind