DevNet Node Setup & Configuration

Rok Černec
ARK.io | Blog
Published in
12 min readAug 31, 2017

Have you been wondering where the ARK public Testnet for all developers, hobbyists, and bug hunters is? Want to help test core upgrades, make your own upgrades/tests, or just play with test ARK? The Testnet is now called DEVNET (Development Network).

The coin/token used on DEVNET is called DARK (DѦ) — these are test tokens that can only be used on DEVNET.

This guide will help you get your DEVNET node up and running in no time!

REMEMBER : THIS GUIDE IS FOR DEVNET AND NOT MAINNET! ALL TOKENS ON DEVNET ARE FOR TESTING PURPOSES AND DON’T HOLD ANY MONETARY VALUE, NOR WILL ANY MAINNET TOKENS WORK ON DEVNET.

You will also need ARK Desktop Wallet 1.3 or later to follow this guide, for switching networks and creating DARK addresses. You can download the latest version from here:

https://github.com/ArkEcosystem/ark-desktop/releases

If you are looking for the MainNet guide, please use this:
How to set up node for MainNet

#1 Setting Up Node for DEVNET

Start by getting a VPS(Virtual Private Server).

Minimum requirements for running a DARK node VPS (active or relay):

— 1 dedicated CPU core, x86 or x64 architecture (the higher the CPU clock speed, the better) — KVM virtualization as opposed to OpenVZ
—1 GB RAM (the more the better, we suggest at least 2GB),
— Ubuntu 16.04.x (this is optimal, and this guide is written for it)
— 10GB free space (we recommend SSD/m.2, as opposed to traditional HDD drives, and we suggest at least 20GB).

Recommended VPS/Cloud providers:
DigitalOcean
Vultr
OVH

  • Connect to your newly created VPS with the IP and password from your provider:

username : root
password : xxx (sent in email)
IP : xxx.xxx.xxx.xxx (sent in email)
SSH port : 22 (this is default)

  • Windows : use any SSH client. For our example, we will use Putty, an open-source client you can download here : download Putty.
  • MAC OS : open Terminal. To start Terminal, go to your Mac’s Applications folder => click on the Utilities folder => then click on Terminal.
  • Linux : depending on your distribution, you can usually open a terminal shell by pressing a combination of “Ctrl + Alt + T” keys.

For terminal in Linux / MAC OS you can connect to the VPS with this command:
ssh user@<your-server-ip>
for example in Linux / MAC OS the command would be:
ssh root@138.197.206.43

Starting an SSH session in Putty:

If you are connecting for the first time to Putty, it will tell you about host key — click ‘Yes’.

An SSH session will open:

Login as: root
Password:
(enter your pass received from your VPS provider)

All bash commands will be in code boxes for this tutorial.

like this
  • Some VPS providers require you to immediately change the root password. If not prompted to do so, changing your root password is still recommended. Use the command:
passwd

On the first run, we recommend running update and upgrade options to get the latest security patches and core updates for Ubuntu 16.04.x . Use the commands:

apt-get update
apt-get dist-upgrade

#2 Setting Up Regular User With Sudo Privileges

Now it is time to create a new regular user with sudo privileges. Sudo privileges allow a user to perform certain administrative tasks.

How to add new regular user:

adduser <yourusername>

Example:

adduser dark

Enter a new password, enter it again, and press [enter] 6 times to accept all of the default values.

Now that you have successfully created a regular user with the username dark (you can choose any username you want except root), it is time to assign this regular user sudo privileges.

Adding sudo privileges to our newly created regular user:

usermod -a -G sudo <yourusername>

Example:

usermod -a -G sudo dark 

Now reboot the server, and reconnect as the newly created user. Connect as you new name(we are using dark for example) and not root. Type :

reboot

Your Putty session will close. Reopen Putty and connect again with your IP.

#3 Connecting Using Your New User

Now, instead of logging in as root, login as the new user (in our case dark).

For terminal in Linux / MAC OS you can connect with this command:
ssh yourusername@<your-server-ip>
In Linux / MAC OS this would be:
ssh dark@138.197.206.43

#4 Installing the DARK Node (DEVNET Node)

Now that our server is ready, it is time to install DARK — development network node. First, download the DARK installer called “DARKcommander” by running this command:

wget https://ark.io/DARKcommander.sh

and execute it with:

bash DARKcommander.sh

DARKcommander will start. You will be prompted to enter your sudo password — the “dark” user password not the initial “root” password.

Now press enter and a system check will be performed on your server. All updates and prerequisites will be installed. This may take a few minutes.

After the updates are finished, you will see this:

type:

sudo reboot

Now reconnect to the server with your sudo user, and again execute:

bash DARKcommander.sh

Again, provide your user password to enter the DARKcommander menu.

DARKcommander menu will open — press ‘1’, and then, ‘ENTER’, to start the installation process. Now the DARK node installation will begin— this will take several minutes!

Please note: when using the DARKcommander menu, letters must be entered as Uppercase.

Upon completion, you will get a message that ARK node was installed. It will ask you to provide the Secret Key — since we don’t have it yet, press ’N’ and ‘enter’ for now.

You have now successfully installed DARK node — congrats! Since we don’t want to wait to sync the blockchain from block zero (takes hours), we have an option to sync from a snapshot (takes minutes).

#5 Syncing Blockchain From a Snapshot

After you are done with the installation, you will be returned to the DARKcommander menu. To sync from a snapshot, we are going to use command 4. Rebuild Database.

A message will be shown:

Would you like to download the latest devnet snapshot? (Y/n)
press ‘Y’ and ‘enter’ to download the latest official devnet snapshot.

Next, you will be asked:

Would you like to restore the snapshot now? (Y/n)
press ‘Y’ and ‘enter’ to restore from the snapshot you just downloaded. This will take a few minutes. Next you will see ‘Current snapshot has been restored’ and DARK node will start. Press ‘enter’ to return to the menu.

#6 Checking If You Are Synced

After this, we can check to see if your node is successfully synced to the blockchain. Once back in the menu, press ‘L’ to view the log.

You should see messages like this “New block received” about every 8 seconds.

If you see this, your node is all ready and synced — it currently acts as a relay node (since it is not set up to forge yet). Press ‘CTRL’ + ‘C’ to close the log and return to the DARKcommander menu.

P.S. : If you don’t want to be a delegate and just needed your own node to play with you can stop here, else continue.

Your node is now ready, and it is time to get a DARK address and register a delegate. You can leave the Putty or terminal session running since we will be returning. We still have more to do if you are going to be running a forging node.

#7 Creating Your Own DARK Address

Now that we have our node ready it is time to take care of some other things.

You will now need ARK Desktop Wallet 1.3 or later to follow this guide. You can download and install latest version from here:

https://github.com/ArkEcosystem/ark-desktop/releases

After you are done with the install, start the ARK Client. In the upper right menu you will see a network icon (shown in the image below) .

Click on in to show available networks. Since we are using the development network now we are going to click on DEVNET(DARK), which will result in the ARK Client being restarted and connected to development network — you will notice that it switches and there won’t be any accounts (since this is not the same network as the main ARK blockchain).

We need to create a DEVNET address (DARK address) — you’ll notice this by all of the DARK addresses starting with capital ‘D’ (as opposed to ARK main chain where all addresses start with capital ‘A’) — this is to prevent confusion and to better differentiate the two.

Now click on CREATE ACCOUNT — you will be presented with a 12 word passphrase.
SAVE IT — this is your access to your DARK address. If you lose it, you won’t be able to send any DARK tokens, or do anything else anymore with that DARK account!

In the next step you will be prompted to type words 3,6, and 9 from your 12 word passphrase to confirm that you have your 12 word written somewhere, and to click on CREATE to open DARK address.

Your account will open, which of course, will say 0 DARK tokens since it is a newly created one. To copy your DARK address to clipboard, just click on it. You will need this address to ask someone from the ARK community to get some DARK tokens.

#8 Getting Your First DARK Tokens

Now that we have the DARK address ready, we want to get some DARK tokens. Easiest way is to register in the ARK slack:

After you are registered, go to the TESTNET channel and paste your DARK address asking for some DARK tokens:

or direct message me on Slack (boldninja) and I’ll send you some:

After someone sends you some DARK tokens, you will notice that the balance has changed in your DARK account in the ARK client. Now it is time to register for a delegate so we can turn our node from a relay node to forging node.

#9 Registering a DARK Delegate

Now that we have our DARK tokens, it is time to register a DARK delegate. Switch back to the Ark Client, and click on the 3 dots icon on the upper right to open a menu — you will notice a REGISTER DELEGATE icon in the bottom menu. Click on it.

Now it is time to choose your delegate name (lowercase letters,numbers, dot, .. only) then type or paste your 12 word passphrase for this account (the one we created in step #7) and click NEXT to continue.

After that you will need to confirm the delegate registration by clicking on the SEND button in next step to broadcast the delegate registration transaction on the blockchain.

You are done — after you see at least 1 confirmation in the Delegate Registration transaction list it means your delegate is registered on the blockchain.

You can restart Ark Client with (CTRL + ‘R’) and open that DARK account again.

Now it is time to “transform” your relay node into a forging node.

#10 Setting Up Your Node for Forging

Now its time to switch back to SSH client (Putty / terminal, …) if we still have session opened. If not, connect to your server and log in with your sudo user name and password, and type:

bash DARKcommander.sh 

then input your sudo passphrase, to get into a DARK commander menu.

We need to turn our node from relay status to forging. We do this by pressing ‘5’ and ‘enter’ in the DARK commander menu (5. Set/Reset Secret) .

A message will be shown

Enter (copy/paste) your private key (secret) (WITHOUT QUOTES!) followed by ‘Enter’

You must enter your 12 word passphrase, from the DARK address with which we registered the delegate name, exactly as it was shown (12 words, all lowercase, separated by spaces, and no space at the end) or paste it. You paste it in Putty by copying your 12 word passphrase (from notepad, for example) and pressing right mouse click anywhere in the Putty window.

When done typing passphrase, press ‘enter’. Then you will need to save the new config file by pressing ‘Y’ and ‘enter’ to apply the changes. Then ‘enter’ again to return to the menu.

(note that if you have input the wrong passphrase you can redo this step by pressing ‘5’ again and typing/pasting passphrase again.)

That is it! You are now all set — the only thing left is to vote for yourself in the Ark Client.

You can follow the logs of the node and its interaction with the blockchain by pressing ‘L’ and then ‘enter,’ in dark commander.

#11 Voting for Yourself to Get You Into the top 51 Active Forging Nodes

Time to switch back to ARK Client — open your DARK address for the delegate. In the menu, click on VOTES and then ADD DELEGATE button.

In the Delegate name section, type your delegate name and then click the ADD DELEGATE button.

Now the only step left is to vote. Click on VOTE button.

A popup will open — type or copy/paste your 12 word passphrase into the Passphrase field and click on NEXT

To confirm your voting transaction, click on SEND.

This is it! You are ready! You can check if you are forging also via Devnet Explorer. Please note that it can take up to ~7 minutes to get in the active delegation if you have enough votes. Since each round takes approximately 51 blocks, each occurring once every 8 seconds) :

https://dexplorer.ark.io/delegateMonitor

If you want to switch back to MAINNET in Ark Client (the ARK mainchain and your ARK addresses), click on the network icon in the right upper menu and click on MAINNET (ARK), and the client will restart. The same applies if you want to switch back to DEVNET.

You can also follow this 2 guides to make your server more secure and enable swap mem:
- How to configure swap memory and swappiness
- How to secure your server

Bumped into a problem along the way? Log on to our Slack and a member of our team or one of the community members will be glad to help you out in #testnet channel: https://arkecosystem.slack.com/messages/C32FSR3C2/

--

--