Skip to content

Instantly share code, notes, and snippets.

@Rav3nPL

Rav3nPL/tecracoin.md

Last active Jan 28, 2021
Embed
What would you like to do?
Basics of TecraCoin console commands need for masternode update

TecraCoin console basics

QT console commands

Get new address (twice)

Get "ownerAddress" and "payoutAddress"

"ownerAddress" need to be unique - you can register only one masternode using one address.

getnewaddress

Get list of usable outputs

Get "collateralHash" and "collateralIndex"

evotnode outputs

Generate new masternode keypair

Get "operatorPubKey" (public) and "tnodeblsprivkey" (secret).

This key pair is unique - you can register only one masternode per key pair.

bls generate

For old system (get "tnodeprivkey"), only if you register new tnode (not need on update).

tnode genkey

Find address to use for network fee payment

Get "feeSourceAddress"

listaddressbalances 0.1

Unlock wallet for 60 seconds

walletpassphrase "YourWalletPassword" 60

Register masternode in new system

protx register "collateralHash"  "ip:Port" "ownerAddress" "operatorPubKey" "" 0 "payoutAddress" "feeSourceAddress"

Edit local tnode.conf (only if new masternode, no need on update)

On windows %appdata%\tecracoin\tnode.conf

Add line (pick alias as you prefer)

alias IP:port tnodeprivkey collateralHash collateralIndex

And restart QT. Activate Tnode after masternode server setup.


TecraCoin commands on masternode server, update to new system

Download and unpack tnode.tar.gz

rm -rf tecracoin-1.*  #delete all old versions
rm -f tnode.tar.gz    #delete old tnode zip file if exist
wget https://github.com/tecracoin/tecracoin/releases/download/v1.7.0.3/tnode.tar.gz   #download binary from github
tar xzf tnode.tar.gz  #unpack to ./bin/ directory

Stop daemon

tecracoin-cli stop

or (depending on system)

bin/tecracoin-cli stop

Minimum entry in masternode .tecracoin/tecracoin.conf

Can be edited using nano, vi, mcedit…

server = 1                  #accept commands from tecracoin-cli
daemon = 1                  #start in background
tnode = 1                   #this is a tnode
tnodeprivkey = xxxxx        #old system, still needed
tnodeblsprivkey = xxxxx     #new system
externalip = xx.xx.x.xx     #if more than one IP on machine 

Start daemon

tecracoind

or (depending on system)

bin/tecracoind

Node information

tecracoin-cli getinfo

Masternode status

tecracoin-cli tnode status      #old system
tecracoin-cli evotnode status   #new system

Others


Autostart daemon on boot

crontab -e  #start crontab editor

add line

@reboot /root/bin/tecracoind

Peek end of log file

tail .tecracoin/debug.log

Peek and follow end of log (break by crtl+c)

tail -f .tecracoin/debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment