Skip to content

repo to launch and manage STAKED notary nodes

License

Notifications You must be signed in to change notification settings

zatJUM/StakedNotary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Staked Notary Control Scripts

Setting up your VPS

You need a new user, you cannot use root

For ubuntu 16.04 login as root and create a user: adduser

Add your user to sudo: gpasswd -a <user> sudo

Its reccomended to install an SSH key to this user. https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

Logout of root and login to your user to continue installing the notary repo.

Install instructions

cd ~
git clone https://github.com/StakedChain/StakedNotary.git
cd StakedNotary

You need to build our special repo of komodo thanks to @libbscott and nanomsg and SuperNET for iguana. Both these scripts cover all required deps on debian based distros.

cd install
./installSuperNET.sh
./buildkomodo.sh
./installnanomsg.sh

Now you need to copy the config file and edit it with our pubkey/Raddress and WIF key for KMD. There needs to be a space after the = sign on each line.

e.g btcpubkey = 02.....

cd ..
cp config_example.ini config.ini
nano config.ini

We also need to unblock the iguana port. To find this:

sudo ufw allow 9997
sudo ufw allow 22
sudo ufw enable

There is a KMD bootstrap here if you want to use this first before starting it will save a lot of time, also some VPS providers seem to be skimmping on RAM, and will crash trying to sync KMD, in this case you need to use the bootstrap. Its not ideal, but it works.

https://bootstrap.0x03.services/komodo/KMD.html

After this we are ready to launch KMD and any chains that happen to be in assetchains.json and import our private keys to them all.

./start.sh

To keep an eye on komodods sync status run: tail -f ~/.komodo/debug.log This could take a while. 2-3H maybe longer. Also the progress of sync is printed to the terminal you started start.sh from.

There is one thing that notary nodes depend on more than anything else and that is the UTXO's. Once iguana has started we need to run @lukechilds excellent UTXO splitter.

./utxosplitter.sh

You also will want to put this UTXO splitter on a cron job every 15 minutes.

crontab -e

Enter this into the cron tab:

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
*/15 * * * * /home/<your_username>/StakedNotary/utxosplitter.sh >> /home/<your_username>/utxo_split.log 2>&1

Adding New Coins

This is the coolest part, super happy about it. Simply add the coins params to assetchains.json (make sure you have the freq param it is required!) and submit a PR and merge it. Then have ALL operators:

./start.sh

There is no need to stop any deamons at this point, if they are already running, they will not start again.

Make sure some funds have been sent and everything should just work. :D

Using some of the Scripts

To get a list of coins: ./listcoins.sh

To issue commands to a coin: asset-cli <COINS_NAME> <COMMAND>

To issue commands to all assetchains: assets-cli <COMMAND>

To kill everything: ./stop.sh

To HARD reset a coins wallet: ./walletreset.sh <coin>

Hard reset will send the entire balance to yourself, then remove all transactions that are not this transaction from the wallet after it has been confirmed. Might look at changing this to after it has been notarised?

To SOFT reset a KMDs wallet (works with ac by specifying -ac_name=): komodo-cli cleanwallettransactions

Soft reset is generally what you will use. This mode, simply removes all txs from that wallet database that are all spent. It means you lose transaction history, but also keeps the node able to build txs in a speedy manner, very important for notarisaions. :)

The install scripts come with the tools:

htop: To monitor system load

slurm: To monitor network load

tmux: To make panes, so you can run these tools and iguana console logs at he same time and detach/reattach when you login/out of the notary node. Google is your friend.

About

repo to launch and manage STAKED notary nodes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 89.7%
  • Python 10.3%