DECENT (DCT) : Witness Node Setup with Troubleshooting Tips (Part 2)
if it ain't hard it isn't worth it
(Part 2/2) An easy to follow guide to get you started setting up your witness node with troubleshooting tips.
This is the second and the last part of the setup guide for deploying your own witness node for DECENT. If you have done Part 1 successfully, you should now have 3 binaries in your build folder at ~/dev/DECENTfoundation/DECENT-Network-build/artifacts/prefix/bin and can run them without errors. This part will show you how to:
- Import your decentgo account
- Create a new account
- Create and run your miner
1. Import your decentgo account.
- First you need to run
./decentddaemon (as a background process)$ cd ~/dev/DECENTfoundation/DECENT-Network-build/artifacts/prefix/bin$ nohup ./decentd &
- Run the
./cli_wallet$ ./cli_wallet$ set_password <my_password>$ unlock <my_password>
- Login to to your decentgo account and proceed to the security page
- Click on
generatedto get your private key - Import your private_key to the running
./cli_walletand Create 3 sets of keys for the new account.unlocked >>> import_key <decentgo_username> <decentgo_private_key>unlocked >>> suggest_brain_key- Note: Take note and store the keys somewhere. You should issue that last command 3 times! the first set of keys will be your owner key, then active key and lastly public signing key respectively.
- Create your new account
unlocked >>> register_account <new_username> <owner_pub_key> <active_pub_key> <decentgo_username> true
- Transfer DCT to your new account ( You need at least 0.5 but i recommend have at least 5 DCT)
unlocked >>> transfer <decentgo_username> <new_username> 5.00 DCT "<memo string>" true
- Now from here on your new account is created with DCT balance, we will now import this newly created account to your wallet.
unlocked >>> import_key <new_username> <active_wif_priv_key>
- close the
./cli_walletby CTRL+D and edit the config file at~/.decent/data/decentd/- stop the
./decentdfrom running on the background. You can do this on various ways but I normally would do$ ps ax | grep decentdthen look for the process id and kill it by$ kill <proccess_id> $ nano ~/.decent/data/decentd/config.ini- Edit this part on the config.ini
private-key = ["active_pub_key","active_wif_priv_key"]
- stop the
- Save and close the
~/.decent/data/decentd/config.iniand run./decentdagain and start./cli_wallet$ nohup ./decentd &$ ./cli_walletlocked >>> unlock <my_password>
- Finally create your miner, edit the
config.iniand relaunch./decentdunlocked >>> create_miner <new_username> "proposal URL" trueunlocked >>> update_miner <new_username> "proposal URL" <public_signing_public_key> trueunlocked >>> get_miner <new_username>- Take note of your miner id and CTRL+D to close the
./cli_walletthen edit~/.decent/data/decentd/config.ini$ nano ~/.decent/data/decentd/config.ini- set these parameters:
enable-stale-production = trueminer-id = "1.4.X"private-key = ["public_signing_pub_key","public_signing_wif_priv_key"]
- Congratulations! at this point you are now ready to run your witness node with the proper configurations.
- save and close the
config.inifile then run (for the last time) the./decentdon the background (you should not stop this daemon at any time (or if not necessary) The stability and uptime of your miner is crucial in building up your reputation as a witness... Please take time to readroelndpthoughts on this.
- save and close the
Now for the troubleshooting tips!
Actions On:
1. Most of the time when performing CLI commands complicated and long directory/file locations may lead to typo errors (but mostyl it's just annoying) so if you're like me i want to keep it simple. Instead of doing this
$ cd ~/dev/DECENTfoundation/DECENT-Network-build/artifacts/prefix/bin
I created a symlink to make it simple
$ ln -s ~/dev/DECENTfoundation/DECENT-Network-build/artifacts/prefix/bin/ ~/decent_bin$ cd decent_bin
2. CLI Wallet interactions
Once you get the hang of it you will find yourself dealing with the ./cli_wallet quite a lot. so here are some few reminders:
-----------
This is it for now. Watch out for my next post on my journey thus far in maintaining and promoting my witness node. Shoutout to @tjpezlo for the motivation on DECENT (DCT). Also supporting the endeavors of @steemph.If you find this post interesting and relevant please upvote/resteem or if you happen to have successfully setup your node you may show me some love and vote_for_miner> precise true true
@mobgod I hope you don't mind me showing you as an example on how to vote for a miner.