Skip to content

Instantly share code, notes, and snippets.

@evias
Last active June 12, 2021 13:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evias/af784fa320efdc265bb69a5e4f38dec6 to your computer and use it in GitHub Desktop.
Save evias/af784fa320efdc265bb69a5e4f38dec6 to your computer and use it in GitHub Desktop.

DHealth Network Troubleshoot

This document illustrates several maintenance events including:

⚠️ Some of the actions listed here may potentially disrupt the normal functioning of your node software. Please, only execute the listed commands if you understand the consequences.

Lost keys

In case you have lost any combination of Remote, VRF and/or Voting keys which are linked to your main account, you must first unlink your account.

✅ If you have already unlinked your account, jump here.

⚠️ If you do not have access to the container/server anymore, you must create a new account for harvesting on the new container. It is only possible to unlink your account voting keys from the original node on which they were generated. If you own a backup of your voting keys, you can try recovering from here.

Unlink your account keys

⚠️ If you unlink your account, it will not be elligible for harvesting on this container/server anymore. Please, use this with caution.

This process will cost up to 0.1 of the network currency.

You can unlink your account keys by executing the following command:

yourdlt link -t dual-node --url http://dual-01.dhealth.cloud:3000 --maxFee=100000 --unlink

You can now proceed to the setup of your new container/server.

Link your account

This process will cost up to 0.1 of the network currency.

You can link your account keys by executing the following command:

yourdlt link -t dual-node --url http://dual-01.dhealth.cloud:3000 --maxFee=100000

Recover voting keys

If you own an encrypted archive with the voting keys, you can use them to continue/restart harversting with the same accounts.

Uncompress the archive in the /opt/dhealth folder with unzip votingkeys.zip. After uncompressing, you can list the files and it should produce an output similar to the following:

$ ls -la votingkeys/
total 48
drwxrwxr-x 2 ubuntu ubuntu  4096 Apr  1 18:24 ./
drwxrwxr-x 9 ubuntu ubuntu  4096 Apr  1 18:28 ../
-rw-rw-r-- 1 ubuntu ubuntu   139 Apr  1 18:24 metadata.yml
-rw------- 1 ubuntu ubuntu 34640 Apr  2 10:19 private_key_tree1.dat

✅ You can verify that you have the correct voting key with cat votingkeys/metadata.yml which will display the voting public key.

⚠️ Before you execute on the next step, make sure that to not overwrite an existing votingkeys folder.

  • First stop your node with yourdlt stop -t dual-node
  • Then add the uncompressed voting keys to your node, please make sure any other private_key would not get overwritten.
# first "backup" the active key
$ mv dual-node/nodes/dhealth-full-node/votingkeys dual-node/nodes/dhealth-full-node/bk.votingkeys

# then place in your recovered key
$ mv votingkeys dual-node/nodes/dhealth-full-node/votingkeys

This is it, when you startup your node again, it will be using your recovered voting keys:

$ yourdlt run -t dual-node -d

Re-use keys for harvesting

If you issued the account keys link from a different client application (wallet, CLI), you must use a custom configuration preset to run your node using those keys.

Following is an example custom configuration preset that you can use to harvest with a specific account which was already linked to supplemental keys:

nodes:
  -
    host: ''
    friendlyName: 'your-awesome-node'
    maxUnlockedAccounts: 40
    enableDelegatedHarvestersAutoDetection: true
    enableAutoHarvesting: true
    beneficiaryAddress: INPUT_HERE
    mainPrivateKey: INPUT_HERE
    remotePrivateKey: INPUT_HERE
    vrfPrivateKey: INPUT_HERE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment