Joining V Systems Testnet

Kwun Yeung
Forbole
Published in
5 min readNov 24, 2019
Photo by Taylor Grote on Unsplash

V Systems is an interesting project which has been under the radar for some time. It caught people’s eyes since the first “public appearance” of its creator, also the inventor of Proof-of-Stake, Sunny King earlier this month. To play around with V Systems, the best way is probably running a full node on their Testnet and play around with the RPC calls.

Sunny King “appeared” during The Capital by CoinMarketCap earlier this month in Singapore

The core team have tried to make everything simple to setup. Let me share how this can be done.

Step 1: Prepare a Server

V Systems is written in Java. It should be able to run on any systems with Java VM. The example below is a node running on a Linux instance with Ubuntu.

Here is the configuration I am using in the example:

  1. No. of CPUs: 2
  2. Memory: 4GB
  3. Disk: 40GB SSD
  4. OS: Ubuntu 18.04 LTS

Step 2: Install Oracle JRE v1.8

This should be a very simple step but there is a mistake in the original document on V Systems Github. If you reference to their How to Install V Systems Testnet Node wiki, the first thing they tell you to do is to install Oracle JRE v1.8 via a ppa. However, this will not work as Oracle requires users to accept their License Agreement before downloading the runtime. Visit Oracle download page and download the version required. The Oracle JRE is free for personal use. Accept the agreement and download jdk-8u231-linux-x64.tar.gz It will prompt you to sign in or create an account when you accept the agreement.

Accept License Agreement and download the correct binary
  • If you node is running on cloud, please upload the downloaded file to the remote instance.

Now you can install the JRE manually by following this guide. Then check the Java version.

$ java -versionjava version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

Step 3: Install V Systems software for Testnet

The V Systems team has prebuilt a package for Debian/Ubuntu. You can install it directly from their Github releases. Get their latest v0.2.2 binary for testnet.

Then run

$ sudo dpkg -i v_systems_0.2.2_testnet.deb

Oops! It cannot be installed because java8-runtime-headless is required to run the node. To fix this, simply run

$ sudo apt --fix-broken install

Ubuntu will install the correct dependencies and let you install the package afterwards. Different Java VM should have been installed by now. Make sure you are setting your environment to run Java with Oracle Java VM. Now run

$ sudo update-alternatives --config java

and select the correct Java VM.

Select the correct Java VM

Now, try installing the package again.

$ sudo dpkg -i v_systems_0.2.2_testnet.deb

Done! Now you have the V Systems binary installed and a service manageable by systemd . You can start the node with

$ sudo service vsys start

That’s it! It should connect to the testnet and start syncing.

Step 4: Configure the node

Hm… However, everything is just too automatic. I know node operators won’t be satisfied when you don’t get enough control and security measures. Let’s take a look at the configuration file. The vsys.conf and node data are located at /var/lib/vsys/.vsys and this directory is symlink to /etc/vsys.

Now, let’s see how we can use the RPC endpoints to read the information from the node. To use the RPC endpoints, you have to first setup your own api-hash-key.

When you open /etc/vsys/vsys.conf, you should see these lines.

rest-api {
enable = yes
bind-address = 0.0.0.0
#api key vsystest2018 for hash 2neEziP8dU5D95rg1BiSpA3seuo5YY5DdYXy6UHzcs5D
api-key-hash = FCtyd3UCUNBJm8TRsXrqbQ5DBdjcV4ia9ZicSD13bigZ
}

What you need to do is to set your own API key and get a hash value. This is mentioned in the V Systems Supernode setup wiki. For example, if your API key is Forbole is the best!, then you can create the hash with doing this.

$ curl -X POST -d 'Forbole is the best!' 'https://test.v.systems/api/utils/hash/secure'{
"message" : "Forbole is the best!",
"hash" : "G8HsksdZwPK6nU7uYsShWQBtg9qqbFqzCC9YFx8YqsyZ"
}

It will return with the api-key-hash you need to put into your vsys.conf file. Replace the api-key-hash with the hash you get and restart the node.

You can access the api via localhost:9922 by using the key now. Try getting the latest height of the node.

$ curl -X GET --header 'Accept: application/json' --header 'api_key: Forbole is the best!' 'localhost:9922/node/status'

You will get result like this

{
"blockchainHeight" : 1073150,
"stateHeight" : 1073150,
"updatedTimestamp" : 1549353410999375790,
"updatedDate" : "2019-02-05T07:56:50.999Z"
}

The API specifications can be found here. However, the documentation is not complete. Instead, the node software comes with a Swagger UI by default. You can open your browser and visit http://localhost:9922. To access the APIs directly on the Swagger UI, you have to authorize with the API key you have set. Click the Authorize 🔒 button and input your API key to authorize.

Swagger UI

You can then access the APIs from the Swagger UI directly.

  1. Joining V Systems Testnet
  2. Wallet management on V Systems
  3. Become a Supernode on V Systems

We have recently declared our Supernode Candidate on the V Systems. If you are a V Systems token holder and considering leasing out your tokens, please consider leasing to us. Our Supernode address is AR45wyKHZnmt7ujqJRT7b4hSk9wX1bjwDkz You can see our leasing status on the https://vsysrate.com/.

--

--

Kwun Yeung
Forbole

Cofounder of Forbole. Active blockchain explorer.