OriginTrail
Search…
Testnet Installation

Obtain test TRAC tokens

In order to receive TRAC tokens on the testnet, please join our discord and post your wallet in the #testnet-discussion channel requesting TRAC from the faucet bot. Discord faucet bot operates on Rinkeby, Kovan and Polygon test networks. You can use the following commands in order to request test TRAC tokens:
Rinkeby: !fundme_rinkeby <wallet_address>
Polygon: !fundme_mumbai <wallet_address>
Kovan: !fundme_kovan <wallet_address>
Bot will provide you with 6000 TRAC tokens on the network of your choice.
Note: In order to see the tokens in your Metamask, you will have to switch it to the desired network and "Import token" by entering the token contract address.

Test TRAC token contracts:

Rinkeby: 0x98d9a611ad1b5761bdc1daac42c48e4d54cf5882
Polygon testnet (Mumbai): 0x10eD38C374b2F5bBA3E85b9c478B9fc69559355B
Kovan testnet: 0x3C841844cFe11d3999eD5c0B0d1714cC1eBB23dc

Bot help:

Ask our bot for help by executing the !help command and see the list of all networks and available interactions.

Prepare the wallets

Create operational wallet and management wallets
Create a new wallet using Mycrypto or Metamask and export the private key, which we will use for the operational wallet for the node. Deposit the amount of test TRAC you want to have on your node, which is minimum 3000 TRAC to secure the network + additional TRAC to be able to accept jobs. Make sure you also have at least 0.1 test ETH,KOVAN or MATIC in order for your node to be able to pay for the blockchain transactions.

Configure the server

Download Termius (or any other terminal client like Kitty) and configure it with the details you received from the VPS hosting (IP, username, password). Click on Hosts, Select New host, Choose a Label for the node and add the IP address from the confirmation e-mail from Digital Ocean or Hetzner that the node is created, choose root as username and input the password, and click on Save on the right top corner.
​
​
Once you login follow the configuration logic below. Click on the COPY button after each command and right click into the terminal window to paste it. Then confirm with Enter

1. Update the server programs:

1
apt update && apt upgrade -y
Copied!
​
​
If you see this notice, choose the first option
​
​

2. Reboot server with below command, close the window and login again

1
reboot
Copied!

3. Install docker (skip this step if you selected the Digital Ocean Server with Docker installation).

The official installation commands for docker can be found here, should the ones in this section become outdated: https://docs.docker.com/engine/install/ubuntu/​
1
apt-get install apt-transport-https ca-certificates curl software-properties-common
Copied!
1
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
Copied!
1
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Copied!
1
apt-get update
Copied!
1
apt-get install docker-ce
Copied!

4. Setup the configuration file

1
nano /root/.origintrail_noderc
Copied!
Paste the below in the text editing tool and update the xxxxx entries accordingly if you are setting up a node only on xDAI:
1
{
2
"blockchain": {
3
"implementations": [
4
{
5
"blockchain_title": "xDai",
6
"network_id": "xdai:testnet",
7
"identity_filepath": "xdai_erc725_identity.json",
8
"dh_price_factor" : "1",
9
"node_wallet": "xxxxxxxx",
10
"node_private_key": "xxxxxxxx",
11
"management_wallet": "xxxxxxxx"
12
}
13
]
14
},
15
"network": {
16
"hostname": "xxx.xxx.xxx.xxx"
17
},
18
"initial_deposit_amount": "5000000000000000000000",
19
"dh_max_holding_time_in_minutes": 530000,
20
"dh_maximum_dataset_filesize_in_mb": 10
21
}
Copied!
save the file by Ctrl-O and Enter and exit by Ctrl-X
If you are going to run nodes on Ethereum as well, use the following configuration file:
1
{
2
"blockchain": {
3
"implementations": [
4
{
5
"blockchain_title": "Ethereum",
6
"network_id": "ethr:rinkeby:1",
7
"identity_filepath": "erc725_identity.json",
8
"dh_price_factor" : "1",
9
"node_wallet": "xxxxxxxx",
10
"node_private_key": "xxxxxxxx",
11
"management_wallet": "xxxxxxxx",
12
"rpc_server_url": "xxxxxxxxxxx"
13
},
14
{
15
"blockchain_title": "xDai",
16
"network_id": "xdai:testnet",
17
"identity_filepath": "xdai_erc725_identity.json",
18
"dh_price_factor" : "1",
19
"node_wallet": "xxxxxxxx",
20
"node_private_key": "xxxxxxxx",
21
"management_wallet": "xxxxxxxx"
22
}
23
]
24
},
25
"network": {
26
"hostname": "xxx.xxx.xxx.xxx"
27
},
28
"initial_deposit_amount": "5000000000000000000000",
29
"dh_max_holding_time_in_minutes": 530000,
30
"disableAutoPayouts": true,
31
"dh_maximum_dataset_filesize_in_mb": 10
32
}
Copied!
Explanation:
initial_deposit_amount – amount of xTRAC you want to deposit on your node during the installation. (5000000000000000000000 is equal to 5000 xTRAC)
node_wallet – Operational wallet public address
node_private_key – Operational wallet private key. As you will store just 0.1 xDAI there for gas fees, even if server gets compromised, the hacker would have access only to this small amount
Note: If your private key start with 0x, remove these two characters when adding it to the configuration file.
management_wallet – this is your management wallet public address – ideally this should be a wallet on your cold storage
dh_price_factor – this is the setting of your lambda value – should be less than 1 if you want to accept most of all current jobs. The lower the value, the less paid jobs you are willing to accept.
Hostname – this is your server IP, which you can find in the notification e-mail when you setup the VPS
dh_max_holding_time_in_minutes – the maximum length of jobs you are willing to accept in minutes (for example 550 000 is to accept one year jobs).

5. Install JQ to validate whether the configuration file doesn’t contain any errors

1
apt-get install jq
Copied!
1
jq "." /root/.origintrail_noderc
Copied!
Check the brackets, double quotes and commas. Everything except your data has to be exactly like the example above.

6. Initiate the node installation

Important: Once you run this command, the TRAC will be deposited to the contract and your first task is to copy and back your ERC725 identity and node identity mentioned on Step 8 below, so you can have control over this deposited amount. Should you get an error at this stage, or if the gas setting you used is too low, do not delete the container or destroy the VPS. Instead join the discord channel or the Official Telegram group to ask for assistance
1
sudo docker run -i --log-driver json-file --log-opt max-size=1g --name=otnode -p 8900:8900 -p 5278:5278 -p 3000:3000 -v ~/.origintrail_noderc:/ot-node/.origintrail_noderc origintrail/ot-node:release_testnet
Copied!
The first installation runs in interactive mode, and when you click CTRL + C, you both exit the log and stop the node. Thus one additional start command is required.
1
docker restart otnode
Copied!

7. Create identities into files on the root directory

ERC725 identity on xDAI
1
docker cp otnode:/ot-node/data/xdai_erc725_identity.json ~/xdai_erc725_identity.json
Copied!
ERC725 identity on Ethereum
1
docker cp otnode:/ot-node/data/erc725_identity.json ~/erc725_identity.json
Copied!
Node ID
1
docker cp otnode:/ot-node/data/identity.json ~/identity.json
Copied!

8. Read erc725 and node id and copy/paste them in secure document

XDAI
1
more xdai_erc725_identity.json
Copied!
Ethereum
1
more erc725_identity.json
Copied!
Node Identity
1
more identity.json
Copied!
Or Login to the server using WINSCP or any other FTP application, go to the root folder and download these two files on your local server and archive them with a password.
​

Additional node configurations

9. Setup the firewall

1
ufw allow 22/tcp && ufw allow 3000 && ufw allow 5278 && ufw allow 8900 && yes | ufw enable
Copied!
Double check the firewall is properly configured:
1
ufw status
Copied!
Could not load image
​

10. Enable auto restart and follow the log to monitor the operation of the node

1
docker update --restart=always otnode
Copied!
1
docker logs -f otnode
Copied!

11. Add swap space

Swap space is dedicated space on your hard drive, which is used as RAM should the hardware RAM is fully utilized. This usually slows down the server as the hard drive is slower than the RAM, however the swap would ensure the node will continue operation. I highly recommend to enable 1 GB Swap space on your server.
1
fallocate -l 1G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile
Copied!
  • confirm it is setup (SWAP line should show 1)
1
free -h
Copied!
  • make it permanent
1
cp /etc/fstab /etc/fstab.bak
Copied!
1
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Copied!