Aligning your Elrond nodes to warp speed

Daniel Blockchain
8 min readDec 22, 2019

--

Here you will learn everything about the nodes in a simple way, the story behind it, how it started and a bit of science fiction to keep things interesting.

I’m here to show you how to fit your battleship (your PC) for the upcoming mainnet.
So far, our battleships and battle stations ( PC’s and VPS’es ) have participated in Battle Of Nodes and some of them fared better than others.
Right now you will learn how to fit your battleship, so you too, will be prepared for the next challenges.
My battleship (PC) is fitted with three nodes, running the latest Elrond version, thanks to the auto-updater.

This is my battleship, running three nodes.
The battle station named Contabo, also runs three of my nodes.
To be honest it’s more of a trade hub, because as you can see, it has many people using it. Contabo has developed into a solid VPS with a huge costumer base. You can see more details about this in their about page, but here is the gist of it:

Below you can see an artistic description of Contabo, with my nodes and lots of activity:

The price is 8.99 EUR/month, with Six cores, 400 GB SSD and 16GB RAM.

As far as the game, it’s the biggest station, but there is some competition to it. Also, it runs more than just my nodes, but as you can see, the shard 3 node is run on the west side, shard 4 node in the center and metachain shard in the east. And now let’s see the competition in terms of battle stations…

It seems that the pricing for similar specs in Contabo (16GB RAM, 400GB SSD, Six Cores, 8.99EUR/month) is 80$/month, for both Vultr and Digital Ocean. Quite a big difference, one might say. The conversion to USD right now would put the price at 10$(EUR/USD = 1.11; 1.11* 9 EUR = 9.99 EUR). Is it worth paying eight times as much for similar specs on other services? Maybe not. However Contabo looks to be a pretty solid competitor.

I thought it would be a good fit to have an Elrond Space Station, so here it is:

How were nodes running the first time? With no auto-updater, and some of them running Windows. Before the auto-updater, we were updating from command line(and some of us using scripts). Here are the links, for Windows, Linux and MacOS:

The tags for these versions remained at v1.0.41, no further updates from then on. Then, after some new versions, around v1.0.51 almost all of us got the auto-updater to work. More about the auto-updater later in the article. This is how the installation process looks like for linux, if you were to install a validator node in the earlier times. Then there are more screenshots with nodes running on PC and VPS.

First you have v1.0.34 running on Windows 10, MSI GE63 RGB 8RE, with Samsung T5 500GB SSD, then v1.0.38 with an older laptop, running Windows 7, Asus G55VW, with the same Samsung T5 SSD.

As you can see, on Windows, on my best screenshots, I made per node either 800k transactions for windows 10 and even 9.9 million transactions on Windows 7! It did have a lot of potential(windows support was stopped, due to VM incompatibility and being slower in general). This was done when the TPS was throttled pretty hard. But there is more! See below, in Linux Contabo Setup:

39.9 Million Transactions per Node! Truly Impressive! I’m pretty sure it hit 40 Million transactions per node on Shard 3 later on. This was at a time when TPS was pushed into testnet all the way to 30000 TPS! If you don’t know what TPS is, it’s Transactions per Second. As you can see, the network is capable of supporting huge workloads.

All the thanks for these beautiful screenshots are made because I had a GUI, thanks to XRDP. It’s pretty convenient, and while there is xfce (more lightweight), I stuck with ubuntu gnome.

Here are the commands that I did for installing XRDP:

sudo apt-get update
sudo apt-get install ubuntu-desktop
sudo apt-get install xrdp

I recommend saving the file (it will have .rdp extension).

After that you will use the username/password details and login.

My security configuration has the following:

  • On VPS I have a dedicated user with sudo access
  • For firewall, I use UFW, and port 3389 is open for XRDP
  • Some spam protection (fail2ban)
  • Not so notable, but worth mentioning , is the use of System Monitor combined with top in command line. It helps monitor the resources, uptime and other useful data. This dashboard gives me a bird’s-eye view into what my nodes and my PC/VPS is doing
  • Termius app. Very useful for connecting to your nodes. I use RealVNC for connecting to my PC. But for VPS(Contabo), XRDP is King

At v1.0.42, an auto-updater was launched, that helps validators to not reinstall every time there is an update. Later on, in version v1.0.51 we got some very nice TPS and TPN(Transactions per Node) numbers. Anyways, here is a guide from Sever, even though I made my own shorter version, with small improvements, further below.

This is the link to elrond-go-scripts, there you will find all the commands available.

https://github.com/ElrondNetwork/elrond-go-scripts-v2

Now, for the advanced auto-updater. Here is my short, concise version:
1. Backup your keys. (Start with a clean VPS/Server)
2.1. If new server then:
cd ~; git clone https://github.com/ElrondNetwork/elrond-go-scripts-v2
2.2. Otherwise:
cd ~/elrond-go-scripts-v2; ./script.sh cleanup; git pull
2.2. +Required for autoupdater:
git checkout --force; git pull; ./script.sh github_pull
3. Edit variables.cfg , change values for CUSTOM_HOME and CUSTOM_USER
->How to find out your current user: whoami
cd ~/elrond-go-scripts-v2/config; nano variables.cfg
Edit it and replace your user to whatever output you had from command whoami
CUSTOM_HOME=”/home/user”
CUSTOM_USER=”user”

<after modifying values press CTRL-X and then choose Y, then Enter>
4. Make sure you have the proper rights
Run:
sudo visudo -f /etc/sudoers.d/myOverrides
Navigate to the end of the file and add this line, where “username” is what you got from running the “whoami” command.
username ALL=(ALL) NOPASSWD:ALL
Save the file and exit
5. Setup private keys
5.1. Create a new folder for private keys
cd ~; mkdir -p ~/VALIDATOR_KEYS
5.2. Zip the keys for each node in it's own zip archive
cd $HOME/elrond-nodes/node-0/config <-this is the default path, make sure to use your own
zip node-0.zip *.pem
mv node-0.zip $HOME/VALIDATOR_KEYS/

Repeat for all the other nodes.
6. Install the node(s), start the node(s).
cd ~/elrond-go-scripts-v2; ./script.sh install; ./script.sh start
7. Start the node's visual interface:
cd $HOME
./elrond-utils/termui -address localhost:8080 (for node 0)
./elrond-utils/termui -address localhost:8081 (for node 1)
...
./elrond-utils/termui -address localhost:808n (for node n)

8. Check if the autoupdater job is added successfully:
crontab -l
Output should be:
*/10 * * * * /bin/bash -c /home/ubuntu/elrond-go-scripts-v2/auto-updater.sh
To see the autoupdate.status, run the following:
cd $HOME
cat autoupdate.status

9. (Optional) If nodes have issues, then:
./script.sh stop
git checkout --force
git pull
./script.sh github_pull
./script.sh upgrade (0r) ./script.sh cleanup; ./script.sh install
./script.sh start

Below is a screenshot with this guide, written in Notepad in the game Eve Online. Also, more screenshots, with my nodes, with highest transactions per node, and with the setup that I use. After windows support was shut down, I installed ubuntu mate 18.04 on Asus G55VW, and with nodes being stored on external SSD Samsung T5. The VPS setup (Contabo) remained unchanged.

For PC I managed 4.8 million TPN in v1.0.51 and 10.7 million TPN in v1.0.60. VPS(contabo) did 4.7 million TPN in v1.0.51 and 13.8 million in v1.0.64. Quite impressive, given the short time frame and the TPS pushed by Elrond Team being under 2000TPS for these versions.

Before we align the nodes to warp speed, watch this nice music video (not mine). Sound affects and moves matter. I actually recommend reading while listening to this kind of music.

Here it is, the BoN Bot confirms all nodes are online! It’s time to Warp!
Warp drive active!

If you liked this article, please vote by sending testnet ERD to this address:
31e4569e2566e973e87ef93f9cd5e3737faefd20c2a43a0a037b031ce229acc1
Thank you!

--

--

Daniel Blockchain

I know blockchain tech since 2012. I like Proof of Stake for the simple reason that it is more energy efficient and faster than Proof of Work.