O
O
Otnode
Search…
Nodes V5 upgrade for xDAI
1. Confirm your node has the latest version
1
docker logs otnode | grep "Version check" | tail -1
Copied!
If your node doesn’t have 4.1.17, restart your docker container and wait for it to update.
Also check if you have enough space on your node.
1
df -h
Copied!
If you are running out of space, check how to cleanup your server and if you are still above 70%, either upgrade your server or add additional volumes.
2. Backup your node
Below is a pic of the recent fire in one of OVH datacenters, which wiped out 3+ million websites which had no backup. Please backup your node now! Instructions how to do that here: https://otnode.com/node-backup/
3. Obtain xDAI and xTRAC
First you need xDAI, which is the gas fee currency on xDAI. Given that the gas fees there are very low, 1-2 xDAI will last you a long time. There are multiple ways to obtain it:
Second you need xTRAC. If you participated in the SFC boarding, you will obtain back 5% of your TRAC contribution as xTRAC bounty. To claim those, please visit the staking website once announced by the team.
You can also convert TRAC tokens to xTRAC using the Omni Bridge. Go to https://omni.xdaichain.com/ Instructions how to use the bridge can be found here: https://docs.tokenbridge.net/eth-xdai-amb-bridge/multi-token-extension/ui-to-transfer-tokens/transfer-erc20
Once you have sorted out your xDAI and xTRAC, you need to add the Custom RPC for xDAI, so you can switch your Metamask to the xDAI network. Easiest way to do it is to go to: https://chainlist.org/ and click add me to metamask button on xDAI section.
Also the custom token contract to see xTRAC on your Metamask is:
1
0xEddd81E0792E764501AaE206EB432399a0268DB5
Copied!
4. Migration script
Extract the migration script:
1
curl -O https://raw.githubusercontent.com/OriginTrail/ot-node/feature/update-migrate-script/scripts/migrate_to_v5.sh
Copied!
Set it as executable:
1
chmod +x migrate_to_v5.sh
Copied!
1
./migrate_to_v5.sh
Copied!
Your node will restart, and you need to open the log file and monitor if the upgrade has been successful and the node has connected to the network.
1
docker logs otnode --tail 1000 -f
Copied!
5. Setup the identity on the VPS
1
nano /root/.origintrail_noderc
Copied!
Then update the config file on your node with the following data :
1
{
2
"blockchain": {
3
"implementations": [
4
{
5
"blockchain_title": "Ethereum",
6
"network_id": "ethr:mainnet",
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:mainnet",
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!
Initial_deposit_amount – amount of xTRAC you want to deposit on your node during the installation (so you skip step 10). (5000000000000000000000 is equal to 5000 xTRAC). Make sure the amount is deposited before you initiate next step.
Restart your node
1
docker restart otnode
Copied!
6. Create identities into files on the root directory
ERC725 identity
1
docker cp otnode:/ot-node/data/xdai_erc725_identity.json ~/xdai_erc725_identity.json
Copied!
Node ID
1
docker cp otnode:/ot-node/data/identity.json ~/identity.json
Copied!
7. Read erc725 and node id and copy/paste them in secure document
1
more xdai_erc725_identity.json
Copied!
1
more identity.json
Copied!
Important: If you get an error where it says you have not enough tokens to create identity and it will retry, but your identity has already been created follow the steps below.
Go to OTHUB and look the transaction which your operational wallet completed (example)
Copy the xDAI identity to a notepad, and then through the terminal application (i.e. Termius) login to the server and enter the following commands while updating the XXXXXX with the identity you copied on the step above
1
echo "{\"identity\":\"XXXXXXXXXXXXXXXXXXX\"}" > xdai_erc725_identity.json
Copied!
Insert the identity file into the OT docker container with the following command:
1
docker cp xdai_erc725_identity.json otnode:/ot-node/data/
Copied!
Restart the node so the new identity can kick in.
1
docker restart otnode
Copied!
Last modified 3mo ago
Copy link